summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix20
1 files changed, 17 insertions, 3 deletions
diff --git a/flake.nix b/flake.nix
index b456354..9295725 100644
--- a/flake.nix
+++ b/flake.nix
@@ -34,6 +34,7 @@
} @ inputs: let
mkHost = {
hostname,
+ username,
system ? "x86_64-linux",
modules ? [],
}:
@@ -45,6 +46,11 @@
{
networking.hostName = hostname;
nixpkgs.overlays = [ ocnix.overlays.default ];
+ users.users.${username} = {
+ isNormalUser = true;
+ extraGroups = [ "networkmanager" "wheel" ];
+ packages = [ ];
+ };
}
ocnix.nixosModules.opencode
home-manager.nixosModules.home-manager
@@ -53,8 +59,10 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
- home-manager.extraSpecialArgs = { inherit inputs; };
- home-manager.users.phos = import ./home-manager/home.nix;
+ home-manager.extraSpecialArgs = {
+ inherit inputs hostname username;
+ };
+ home-manager.users.${username} = import ./home-manager/home.nix;
}
]
++ modules;
@@ -65,6 +73,7 @@
nixosConfigurations = {
phosphophyllite = mkHost {
hostname = "phosphophyllite";
+ username = "phos";
modules = [
./hosts/phosphophyllite
];
@@ -73,6 +82,7 @@
# Add your laptop here when ready.
# laptop-hostname = mkHost {
# hostname = "laptop-hostname";
+ # username = "dia";
# modules = [ ./hosts/laptop ];
# };
};
@@ -84,7 +94,11 @@
"phos@phosphophyllite" = home-manager.lib.homeManagerConfiguration {
# Home-manager requires 'pkgs' instance
pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME replace x86_64-linux with your architecture
- extraSpecialArgs = {inherit inputs;};
+ extraSpecialArgs = {
+ inherit inputs;
+ hostname = "phosphophyllite";
+ username = "phos";
+ };
# > Our main home-manager configuration file <
modules = [./home-manager/home.nix];
};