This commit is contained in:
Vivian 2022-08-20 12:55:59 +02:00
parent ddaf32e68a
commit b028ddcdc5
5 changed files with 74 additions and 17 deletions

View file

@ -28,7 +28,7 @@
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_2",
"utils": "utils_3"
"utils": "utils_4"
},
"locked": {
"lastModified": 1648475189,
@ -179,6 +179,27 @@
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils_2"
},
"locked": {
"lastModified": 1660574517,
"narHash": "sha256-Lp5D2pAPrM3iAc1eeR0iGwz5rM+SYOWzVxI3p17nlrU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "688e5c85b7537f308b82167c8eb4ecfb70a49861",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
@ -216,7 +237,7 @@
"nixpkgs": [
"nixpkgs"
],
"utils": "utils_2"
"utils": "utils_3"
},
"locked": {
"lastModified": 1660631203,
@ -356,6 +377,7 @@
"root": {
"inputs": {
"colmena": "colmena",
"home-manager": "home-manager",
"minecraft-servers": "minecraft-servers",
"nixpkgs": "nixpkgs",
"serokell-nix": "serokell-nix",
@ -419,6 +441,21 @@
}
},
"utils_2": {
"locked": {
"lastModified": 1653893745,
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_3": {
"inputs": {
"flake-utils": "flake-utils_2"
},
@ -436,7 +473,7 @@
"type": "github"
}
},
"utils_3": {
"utils_4": {
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",

View file

@ -19,10 +19,15 @@
minecraft-servers.url = "github:jyooru/nix-minecraft-servers";
minecraft-servers.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self, nixpkgs, vault-secrets, serokell-nix, minecraft-servers, colmena, ... }@inputs:
{ self, nixpkgs, vault-secrets, serokell-nix, minecraft-servers, colmena, home-manager, ... }@inputs:
let
inherit (nixpkgs) lib;
inherit (builtins) filter mapAttrs attrValues concatLists;
@ -84,6 +89,7 @@
imports = [
./nixos/common
./nixos/hosts/other/null/configuration.nix
home-manager.nixosModules.home-manager
];
deployment = {

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
@ -19,6 +19,12 @@ in
./hardware-configuration.nix
];
# home-manager
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.victor = import ./home.nix;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@ -26,6 +32,9 @@ in
# Enable networking
networking.networkmanager.enable = true;
networking.interfaces.wlp0s20f3.useDHCP = true;
fileSystems."/".options = [ "compress=zstd" ];
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.utf8";
@ -49,17 +58,13 @@ in
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "altgr-intl";
xkbOptions = "caps:swapescape";
videoDrivers = [ "nvidia" ];
};
# modesetting
# hardware.nvidia.modesetting.enable = true;
hardware.nvidia.prime = {
offload.enable = true;
@ -67,13 +72,9 @@ in
nvidiaBusId = "PCI:1:0:0";
};
specialisation = {
external-display.configuration = {
system.nixos.tags = [ "external-display" ];
hardware.nvidia.prime.offload.enable = lib.mkForce false;
hardware.nvidia.powerManagement.enable = lib.mkForce false;
};
};
hardware.opengl.extraPackages = with pkgs; [
vaapiVdpau
];
# Enable CUPS to print documents.
services.printing.enable = true;
@ -101,6 +102,8 @@ in
vim
];
services.fstrim.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

View file

@ -31,7 +31,7 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }: {
home.username = "victor";
home.homeDirectory = "/home/victor";
home.stateVersion = "22.05";
programs.home-manager.enable = true;
programs.firefox = {
enable = true;
package = pkgs.firefox-devedition-bin;
};
}