tweaking
This commit is contained in:
parent
80dbb77a3a
commit
3b7618e9af
3 changed files with 45 additions and 23 deletions
41
flake.nix
41
flake.nix
|
|
@ -125,54 +125,73 @@
|
|||
|
||||
primaryUser = "serenity"; # used for admin purposes
|
||||
#flakePath = "/home/${primaryUser}/SerenityOS/"; # for v1.0.0 release
|
||||
#flakePath = "~/flakes/nixdots/"; # current path
|
||||
#disksPath = "~/Disks/";
|
||||
flakePath = "/home/${primaryUser}/flakes/nixdots/"; # current path
|
||||
disksPath = "/home/${primaryUser}/Disks/";
|
||||
|
||||
in {
|
||||
|
||||
## Installer for easy nuke-n-paves
|
||||
packages.x86_64-linux = {
|
||||
install-iso = nixos-generators.nixosGenerate {
|
||||
iso = nixos-generators.nixosGenerate {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/iso ];
|
||||
format = "install-iso";
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit flakePath disksPath;
|
||||
inherit primaryUser;
|
||||
};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
musnix.nixosModules.musnix
|
||||
disko.nixosModules.disko
|
||||
./hosts/iso
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
## Available through 'nixos-rebuild <switch> --flake /path/to/flake/directory#yourhostname'
|
||||
nixosConfigurations = {
|
||||
|
||||
## Desktop
|
||||
## Desktop - primary config
|
||||
hades = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit flakePath disksPath;
|
||||
inherit primaryUser;
|
||||
};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
musnix.nixosModules.musnix
|
||||
disko.nixosModules.disko
|
||||
sops-nix.nixosModules.sops
|
||||
./hosts/hades
|
||||
];
|
||||
};
|
||||
|
||||
## Home server
|
||||
orcus = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit flakePath disksPath;
|
||||
inherit primaryUser;
|
||||
};
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
sops-nix.nixosModules.sops
|
||||
disko.nixosModules.disko
|
||||
./hosts/orcus
|
||||
];
|
||||
};
|
||||
|
||||
## Laptop
|
||||
persephone = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit flakePath disksPath;
|
||||
inherit primaryUser;
|
||||
};
|
||||
modules = [
|
||||
disko.nixosModules.disko
|
||||
sops-nix.nixosModules.sops
|
||||
musnix.nixosModules.musnix
|
||||
disko.nixosModules.disko
|
||||
./hosts/persephone
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
## https://nix-community.github.io/home-manager/options.xhtml#opt-home.file
|
||||
## https://nix-community.github.io/home-manager/options.xhtml#opt-home.activation
|
||||
|
||||
{ ... }:
|
||||
{ disksPath, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
## Path to automount disks to
|
||||
"Disks" = {
|
||||
source = ../automount/Disks;
|
||||
source = ./Disks;
|
||||
target = "${disksPath}";
|
||||
recursive = true;
|
||||
};
|
||||
## (current) Flake path
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
{ inputs, outputs, pkgs, ... }:
|
||||
{ inputs, outputs, pkgs, flakePath, disksPath, primaryUser, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
imports = [ inputs.home-manager.nixosModules.default ];
|
||||
|
||||
users.users = {
|
||||
## Define users like this
|
||||
serenity = {
|
||||
${primaryUser} = {
|
||||
description = "Serenity Amalgam";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "gamemode" "audio" ];
|
||||
|
|
@ -24,7 +22,11 @@
|
|||
## Enables verbose output on activation
|
||||
verbose = true;
|
||||
## This line passes in specialArgs from flake.nix
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
inherit primaryUser;
|
||||
inherit flakePath disksPath;
|
||||
};
|
||||
## This line ensures all packages declared follow the
|
||||
## same nix-channel we declared in the flake.nix
|
||||
useGlobalPkgs = true;
|
||||
|
|
@ -33,12 +35,12 @@
|
|||
users = {
|
||||
|
||||
## Also make sure to include a user definition here
|
||||
serenity = {
|
||||
${primaryUser} = {
|
||||
## This is where the user configs/packages are imported
|
||||
imports = [ ./u-serenity.nix ];
|
||||
imports = [ ./u-${primaryUser}.nix ];
|
||||
home = {
|
||||
username = "serenity";
|
||||
homeDirectory = "/home/serenity";
|
||||
username = "${primaryUser}";
|
||||
homeDirectory = "/home/${primaryUser}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue