adding global username option maybe?

This commit is contained in:
serenity-F 2024-12-26 19:16:24 +10:00
parent 5ba9dfbc92
commit b9d4d57b6d
2 changed files with 63 additions and 57 deletions

115
flake.nix
View file

@ -1,4 +1,4 @@
## SerenityOS
# # SerenityOS
##
## - A study in linux, packaging, user experience,
## system and desktop environments, themeing,
@ -37,7 +37,7 @@
## - Work on commenting and reformating flake is ongoing
inputs = {
## Nixpkgs version
## there was a way to have unstable as an overlay,
## will set it back up, lazy rn, for now pick one
@ -52,12 +52,10 @@
};
## Flake parts
flake-utils = {
url = "github:numtide/flake-utils";
};
flake-utils = { url = "github:numtide/flake-utils"; };
flake-parts = {
url = "github:hercules-ci/flake-parts";
#inputs.nixpkgs.follows = "nixpkgs";
#inputs.nixpkgs.follows = "nixpkgs";
};
## Lix, alternative nix implementation
@ -72,9 +70,7 @@
};
## Musnix - https://github.com/musnix/musnix
musnix = {
url = "github:musnix/musnix";
};
musnix = { url = "github:musnix/musnix"; };
## Secrets management
sops-nix = {
@ -82,13 +78,13 @@
## optional, not necessary for the module
inputs.nixpkgs.follows = "nixpkgs";
};
## Dots management
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
## Zoomer text editor
nixvim = {
url = "github:nix-community/nixvim";
@ -100,7 +96,7 @@
## Easy themeing <3
nix-colors.url = "github:misterio77/nix-colors";
## nixos generators
nixos-generators = {
url = "github:nix-community/nixos-generators";
@ -111,58 +107,63 @@
outputs = { self, nixpkgs, disko, sops-nix, musnix, nixos-generators, ... }
@ inputs: let
inherit (self) outputs;
in {
@inputs:
let
## Installer for easy nuke-n-paves
packages.x86_64-linux = {
install-iso = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = [
./hosts/iso
];
format = "install-iso";
specialArgs = {inherit inputs outputs;};
};
};
inherit (self) outputs;
## Available through 'nixos-rebuild <switch> --flake /path/to/flake/directory#yourhostname'
nixosConfigurations = {
username = "Serenity";
## Desktop
hades = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
musnix.nixosModules.musnix
disko.nixosModules.disko
sops-nix.nixosModules.sops
./hosts/hades/default.nix
];
in {
## Installer for easy nuke-n-paves
packages.x86_64-linux = {
install-iso = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = [ ./hosts/iso ];
format = "install-iso";
specialArgs = { inherit inputs outputs; };
};
};
## Home server
orcus = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
disko.nixosModules.disko
sops-nix.nixosModules.sops
./hosts/orcus
];
};
## Available through 'nixos-rebuild <switch> --flake /path/to/flake/directory#yourhostname'
nixosConfigurations = {
## Desktop
hades = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
inherit username;
};
modules = [
musnix.nixosModules.musnix
disko.nixosModules.disko
sops-nix.nixosModules.sops
./hosts/hades
];
};
## Home server
orcus = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
disko.nixosModules.disko
sops-nix.nixosModules.sops
./hosts/orcus
];
};
## Laptop
persephone = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
disko.nixosModules.disko
sops-nix.nixosModules.sops
./hosts/persephone
];
};
## Laptop
persephone = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
disko.nixosModules.disko
sops-nix.nixosModules.sops
./hosts/persephone
];
};
};
};
}

View file

@ -34,6 +34,11 @@
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/run/media/${username}/Tartarus" = {
device = "/dev/disk/by-uuid/26d8d9d1-67d2-4d61-a092-10ed7368b9f6";
fsType = "ext4";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/b7ccf8c3-3641-4035-b91f-f7e54c6dd380"; }];