Compare commits

..

No commits in common. "6434b248053180b2913725879ca9becd53f3ebd7" and "2144d9ef61a51af58dc9a980c54722227345e980" have entirely different histories.

120 changed files with 215 additions and 186 deletions

2
.gitattributes vendored
View file

@ -1 +1 @@
system/secrets/** filter=git-crypt diff=git-crypt modules/system/secrets/** filter=git-crypt diff=git-crypt

View file

@ -28,7 +28,7 @@
}@inputs: }@inputs:
{ {
nixosConfigurations.rubble = nixpkgs.lib.nixosSystem { nixosConfigurations.rubble = nixpkgs.lib.nixosSystem {
modules = [ ./system ]; modules = [ ./host ];
specialArgs = inputs; specialArgs = inputs;
}; };
}; };

19
host/default.nix Normal file
View file

@ -0,0 +1,19 @@
{ ... }:
{
imports = [
./disko
./hardware
../modules/system
];
networking = {
hostName = "rubble";
hostId = "e0b1fcef";
};
system = {
extlinux.enable = true;
wireless.enable = true;
stateVersion = "24.11";
};
}

View file

@ -68,12 +68,8 @@
mountOptions = [ "compress=zstd" "noatime" "ssd" ]; mountOptions = [ "compress=zstd" "noatime" "ssd" ];
}; };
"/persist/.snapshots" = { }; "/persist/.snapshots" = { };
"/persist/home/${config.sysusers.main}" = { };
"/persist/home/jules" = { }; "/persist/home/${config.sysusers.main}/.snapshots" = { };
"/persist/home/jules/.snapshots" = { };
"/persist/home/jimbo" = { };
"/persist/home/jimbo/.snapshots" = { };
}; };
}; };
}; };

View file

@ -1,9 +1,7 @@
{ home-manager, ... }: { home-manager, ... }:
{ {
imports = [ imports = [
./jules ./main
./jimbo
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
]; ];
} }

View file

@ -0,0 +1,48 @@
{ config, lib, pkgs, ... }:
{
options.sysusers = lib.mkOption {
type = lib.types.attrs;
};
config = {
sysusers.main = "jimbo";
users.users."${config.sysusers.main}" = {
hashedPassword = config.secrets.mainAccPass;
isNormalUser = true;
openssh.authorizedKeys.keyFiles = [
../../../../../../hosts/tower/id_ed25519.pub
../../../../../../hosts/envy/id_ed25519.pub
../../../../../../hosts/redmond/id_ed25519.pub
../../../../../../hosts/kitty/id_ed25519.pub
../../../../../../hosts/midas/id_ed25519.pub
../../../../../../hosts/prophet/id_ed25519.pub
../../../../../../hosts/rubble/id_ed25519.pub
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJahAoF74BY6GCTsFkt1ADKaraFgJJozW1Y1aBTLK0j9 Pixel9"
];
extraGroups = [
"wheel"
"audio"
"video"
"input"
"disk"
"dialout"
"rtkit"
"kvm"
"libvirtd"
"qemu-libvirtd"
"nginx"
"minecraft"
"nfsShare"
];
uid = 1000;
shell = pkgs.zsh;
};
home-manager.users."${config.sysusers.main}" = import ../../../../../home;
};
}

View file

@ -0,0 +1,38 @@
{ config, lib, pkgs, ... }:
{
options.sysusers = lib.mkOption {
type = lib.types.attrs;
};
config = {
sysusers.main = "jimbo";
users.users."${config.sysusers.main}" = {
hashedPassword = config.secrets.mainAccPass;
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC2lMkUd+BbXITE5LTg94hEzmA6UKsIIbaf5YOjGoLzl"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIFGHaxdTeC1xnTx2BY5LLR5LxhdSkmYoWuOeEuRIz0k"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJahAoF74BY6GCTsFkt1ADKaraFgJJozW1Y1aBTLK0j9 Pixel9"
];
extraGroups = [
"wheel"
"audio"
"video"
"input"
"disk"
"dialout"
"rtkit"
"kvm"
"libvirtd"
"qemu-libvirtd"
"nginx"
"nfsShare"
];
uid = 1000;
shell = pkgs.zsh;
};
home-manager.users."${config.sysusers.main}" = import ../../../../../home;
};
}

View file

@ -0,0 +1,16 @@
{ lib, ... }:
{
imports = [
./accounts
./devices
./programs
./secrets
./services
./settings
];
options.system = with lib; {
desktop.enable = lib.mkEnableOption "Enable desktop apps and services";
server.enable = lib.mkEnableOption "Enable server apps and services";
};
}

View file

@ -0,0 +1,10 @@
{ config, lib, ... }:
{
options.system.extlinux.enable = lib.mkEnableOption "Enable extlinux";
config.boot.loader = lib.mkIf config.system.extlinux.enable {
grub.enable = false;
systemd-boot.enable = lib.mkForce false;
generic-extlinux-compatible.enable = true;
};
}

View file

@ -3,7 +3,6 @@
imports = [ imports = [
./boot ./boot
./disks ./disks
./hardware
./networking ./networking
]; ];
} }

View file

@ -1,7 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./disko
./filesystems ./filesystems
./immutable ./immutable
./impermanence ./impermanence

View file

@ -1,10 +1,8 @@
{ impermanence, ... }: { impermanence, ... }:
{ {
imports = [ imports = [
./jules ./main
./jimbo
./root ./root
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
]; ];
} }

View file

@ -0,0 +1,46 @@
{ config, ... }:
{
environment.persistence."/persist" = {
hideMounts = true;
users.${config.sysusers.main} = {
directories = [
"Keepers"
"Documents"
"Pictures"
"Videos"
"Games"
"VMs"
".snapshots"
".mozilla"
".thunderbird"
".config/blender"
".config/dconf"
".config/vesktop"
".config/sunshine"
".config/heroic"
".config/obs-studio"
".local/share/mpd"
".local/share/nvim/undo"
".local/share/PrismLauncher"
".local/share/Steam"
".local/share/TelegramDesktop"
".local/state/wireplumber"
".cache/nix-index"
{ directory = ".ssh"; mode = "0700"; }
{ directory = ".gnupg"; mode = "0700"; }
{ directory = ".local/share/keyrings"; mode = "0700"; }
];
files = [
".zsh_history"
".local/state/lazygit/state.yml"
".local/share/applications" # Create directory so nothing generates inside of it
];
};
};
}

View file

@ -1,8 +1,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./jules ./main
./jimbo
./root ./root
]; ];

View file

@ -1,7 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
services.snapper.configs.jules = lib.mkIf config.environment.persistence."/persist".enable { services.snapper.configs.${config.sysusers.main} = lib.mkIf config.environment.persistence."/persist".enable {
SUBVOLUME = "/persist/home/jules"; SUBVOLUME = "/persist/home/${config.sysusers.main}";
TIMELINE_CREATE = true; TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true; TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_DAILY = 1; TIMELINE_LIMIT_DAILY = 1;

View file

@ -1,10 +1,9 @@
{ config, pkgs, ... }: { config, ... }:
{ {
imports = [ ./wireless ];
networking = { networking = {
wireless = { wireless.enable = false;
enable = false;
iwd.enable = true;
};
dhcpcd.enable = true; dhcpcd.enable = true;
nftables.enable = true; nftables.enable = true;
firewall.allowPing = false; firewall.allowPing = false;
@ -22,9 +21,4 @@
fallbackDns = config.networking.nameservers; fallbackDns = config.networking.nameservers;
dnsovertls = "true"; dnsovertls = "true";
}; };
environment = {
systemPackages = with pkgs; [ impala ];
persistence."/persist".directories = [ "/var/lib/iwd/" ];
};
} }

View file

@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
{
options.system.wireless.enable = lib.mkEnableOption "Enable wireless stack";
config = lib.mkIf config.system.wireless.enable {
networking.wireless.iwd.enable = true;
environment = {
systemPackages = with pkgs; [ impala ];
persistence."/persist".directories = [ "/var/lib/iwd/" ];
};
};
}

Binary file not shown.

View file

@ -33,5 +33,7 @@
"virbr0" "virbr0"
"virbr1" "virbr1"
]; ];
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 - libvirtd -" ];
}; };
} }

Some files were not shown because too many files have changed in this diff Show more