WIP: Switch to NixOS #5
4 changed files with 43 additions and 16 deletions
31
flake.nix
31
flake.nix
|
@ -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
12
home-manager.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
backupFileExtension = "bak";
|
||||||
|
users.functionalhacker =
|
||||||
|
import ./users/functionalhacker/home.nix;
|
||||||
|
};
|
||||||
|
}
|
12
hosts/Shire/configuration.nix
Normal file
12
hosts/Shire/configuration.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../wifi.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "Shire";
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
}
|
|
@ -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";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue