test
This commit is contained in:
parent
29f83139fa
commit
dd5390cbcf
3 changed files with 8 additions and 27 deletions
35
flake.nix
35
flake.nix
|
@ -20,14 +20,17 @@
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, lanzaboote, ... }:
|
outputs = { nixpkgs, home-manager, lanzaboote, ... }:
|
||||||
let
|
let
|
||||||
|
|
||||||
|
# Variables - Remember to set these
|
||||||
hostname = "nixos-laptop";
|
hostname = "nixos-laptop";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
# Tells Flake what OS version we are using
|
# Tells Flake what OS version we are using
|
||||||
inherit system;
|
inherit system;
|
||||||
config = { allowUnfree = true; };
|
config = { allowUnfree = true; };
|
||||||
};
|
};
|
||||||
|
networking.hostname = "${hostname}"
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
in {
|
in {
|
||||||
# Set up users with home-manager
|
# Set up users with home-manager
|
||||||
|
@ -44,19 +47,19 @@
|
||||||
inherit system pkgs;
|
inherit system pkgs;
|
||||||
username = "root";
|
username = "root";
|
||||||
homeDirectory = "/root";
|
homeDirectory = "/root";
|
||||||
configuration.imports = [ ./users/rootd/home.nix ];
|
configuration.imports = [ ./users/root/home.nix ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# NixOS Configuration files:
|
# NixOS Configuration files:
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# Declare the configuration for my laptop
|
# Declare the configuration for my laptop
|
||||||
nixos-p1 = lib.nixosSystem {
|
nixos = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
# Hardware Configuration
|
# Hardware Configuration
|
||||||
./hardware/lenovo-p1/hardware-configuration.nix
|
(./hosts/+("/"+hostname)+/hardware-configuration.nix)
|
||||||
./hardware/lenovo-p1/configuration.nix
|
(./hosts/+("/"+hostname)+/configuration.nix)
|
||||||
# SecureBoot Configuration
|
# SecureBoot Configuration
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
|
|
||||||
|
@ -70,28 +73,6 @@
|
||||||
}
|
}
|
||||||
]; # modules
|
]; # modules
|
||||||
}; # lib.nixosSystem - nixos-laptop
|
}; # lib.nixosSystem - nixos-laptop
|
||||||
|
|
||||||
# Declare the configuration for my desktop
|
|
||||||
nixos-desktop = lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = [
|
|
||||||
# Hardware Configuration
|
|
||||||
./hardware/desktop.nix
|
|
||||||
|
|
||||||
# SecureBoot Configuration
|
|
||||||
lanzaboote.nixosModules.lanzaboote
|
|
||||||
|
|
||||||
# NixOS Configuration file
|
|
||||||
./configuration.nix
|
|
||||||
|
|
||||||
# Tell home-manager to use both global and user packages:
|
|
||||||
home-manager.nixosModules.home-manager {
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
}
|
|
||||||
]; # modules
|
|
||||||
}; # lib.nixosSystem - nixos-laptop
|
|
||||||
|
|
||||||
}; # nixosConfiguration
|
}; # nixosConfiguration
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue