Moved user modules

This commit is contained in:
Jan-Bulthuis 2025-01-24 00:50:13 +01:00
parent 9352fa2649
commit 0932432e11
80 changed files with 64 additions and 6 deletions

View File

@ -1,5 +1,25 @@
{ {
"nodes": { "nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1737669579,
"narHash": "sha256-v9WQ3c4ctwPMfdBZMZxpdM9xXev4uChce4BxOpvsu0E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7b9ece1bf3c8780cde9b975b28c2d9ccd7e9cdb9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1737469691, "lastModified": 1737469691,
@ -18,6 +38,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View File

@ -3,17 +3,22 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
{ self, nixpkgs }: { nixpkgs, home-manager, ... }:
{ {
nixosConfigurations = { nixosConfigurations = {
"20212060" = nixpkgs.lib.nixosSystem { "20212060" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./machines/laptop.nix ./machines/laptop.nix
../hardware-configuration.nix home-manager.nixosModules.home-manager
{ }
]; ];
}; };
}; };

View File

@ -1,4 +1,4 @@
{ ... }: { lib, ... }:
{ {
imports = [ imports = [
@ -27,5 +27,35 @@
sudo = true; sudo = true;
configuration = ../users/jan.nix; configuration = ../users/jan.nix;
}; };
# Hardware configuration
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
swapDevices = [ ];
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
fileSystems."/" = {
device = "/dev/disk/by-uuid/3b91eaeb-ea95-4bea-8dc1-f55af7502d23";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/46BF-DE2C";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
}; };
} }

View File

@ -82,6 +82,8 @@ in
"nvidia-settings" "nvidia-settings"
]; ];
nix.settings.experimental-features = "nix-command flakes"; nix.settings.experimental-features = "nix-command flakes";
networking.useDHCP = true;
nixpkgs.hostPlatform = "x86_64-linux";
# TODO: Move to USB module # TODO: Move to USB module
# services.gvfs.enable = true; # services.gvfs.enable = true;

View File

@ -56,10 +56,10 @@ in
{ {
imports = [ imports = [
# Import home manager # Import home manager
<home-manager/nixos> # <home-manager/nixos>
# Import system wide configuration required for user modules # Import system wide configuration required for user modules
./modules/systemwide/default.nix ../../user-modules/systemwide/default.nix
]; ];
options = { options = {
@ -85,7 +85,7 @@ in
nixvim.homeManagerModules.nixvim nixvim.homeManagerModules.nixvim
# Modules # Modules
./modules/default.nix ../../user-modules/default.nix
# Custom packages # Custom packages
../../pkgs/default.nix ../../pkgs/default.nix