WIP: Switch to NixOS #5

Draft
FunctionalHacker wants to merge 1349 commits from nix into main
4 changed files with 43 additions and 16 deletions
Showing only changes of commit 3ac81e8aef - Show all commits

View file

@ -17,26 +17,27 @@
}; };
outputs = { nixpkgs, home-manager, nur, ... } @inputs: outputs = { nixpkgs, home-manager, nur, ... } @inputs:
{ let
nixosConfigurations.Mirkwood = nixpkgs.lib.nixosSystem { configureNixSystem = hostname: nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./hosts/Mirkwood/configuration.nix # Host specific configuration
./nixos_common.nix ./hosts/${hostname}/configuration.nix
{ nixpkgs.overlays = [ nur.overlay ]; }
# Common settings for all hosts
({ pkgs, ... }: import ./nixos_common.nix
{ inherit inputs; inherit pkgs; })
# home-manager
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ ({ ... }: import ./home-manager.nix { inherit inputs; })
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
backupFileExtension = "bak";
users.functionalhacker =
import ./users/functionalhacker/home.nix;
};
}
]; ];
}; };
in
{
nixosConfigurations = {
Mirkwood = configureNixSystem "Mirkwood";
Shire = configureNixSystem "Shire";
};
}; };
} }

12
home-manager.nix Normal file
View file

@ -0,0 +1,12 @@
{ inputs, ... }:
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
backupFileExtension = "bak";
users.functionalhacker =
import ./users/functionalhacker/home.nix;
};
}

View file

@ -0,0 +1,12 @@
{ ... }:
{
imports = [
./hardware-configuration.nix
../../wifi.nix
];
networking.hostName = "Shire";
# TODO
}

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, inputs, ... }:
{ {
imports = [ imports = [
@ -7,6 +7,8 @@
./users/som/configuration.nix ./users/som/configuration.nix
]; ];
nixpkgs.overlays = [ inputs.nur.overlay ];
system.stateVersion = "24.05"; system.stateVersion = "24.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
time.timeZone = "Europe/Helsinki"; time.timeZone = "Europe/Helsinki";