diff --git a/.gitignore b/.gitignore index 905fdf87..81e79884 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ old -result + diff --git a/flake.nix b/flake.nix index 08857e26..a5574aff 100644 --- a/flake.nix +++ b/flake.nix @@ -32,13 +32,11 @@ outputs = { self, nixpkgs, - home-manager, ... } @ inputs: let inherit (nixpkgs) lib; defaultConfig = { - desktop = true; }; makeHost = host: let @@ -53,10 +51,6 @@ ./hosts/${host}/hardware-configuration.nix ./system {networking.hostName = host;} - ] - ++ lib.optionals config.desktop [ - home-manager - ./home ]; }; in { diff --git a/headless/default.nix b/headless/default.nix deleted file mode 100644 index 64629674..00000000 --- a/headless/default.nix +++ /dev/null @@ -1 +0,0 @@ -{...}: {} diff --git a/home/default.nix b/home/default.nix deleted file mode 100644 index 64629674..00000000 --- a/home/default.nix +++ /dev/null @@ -1 +0,0 @@ -{...}: {} diff --git a/system/audio.nix b/system/audio.nix deleted file mode 100644 index 888fa8d7..00000000 --- a/system/audio.nix +++ /dev/null @@ -1,9 +0,0 @@ -{...}: { - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; -} diff --git a/system/bluetooth.nix b/system/bluetooth.nix deleted file mode 100644 index 6dc8d175..00000000 --- a/system/bluetooth.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - hardware.bluetooth.enable = true; -} diff --git a/system/btrfs.nix b/system/btrfs.nix deleted file mode 100644 index 1b2ae872..00000000 --- a/system/btrfs.nix +++ /dev/null @@ -1,11 +0,0 @@ -{...}: { - services.btrfs.autoScrub = { - enable = true; - interval = "Fri 07:00"; - fileSystems = [ - "/persist" - "/nix" - ]; - }; -} - diff --git a/system/default.nix b/system/default.nix index b3fceaee..99a4a168 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1,26 +1,5 @@ {...}: { imports = [ ./boot.nix - ./packages.nix - ./env.nix - ./btrfs.nix - ./users.nix - - ./networking.nix - ./persistence.nix - ./nix.nix - ./audio.nix - ./ssh.nix - - ./syncthing.nix - ./wayland.nix - ./steam.nix - - ./nfs.nix - ./fonts.nix - ./bluetooth.nix - ./zsh.nix ]; - - system.stateVersion = "24.11"; } diff --git a/system/env.nix b/system/env.nix deleted file mode 100644 index 8b582f61..00000000 --- a/system/env.nix +++ /dev/null @@ -1,9 +0,0 @@ -{...}: { - time.timeZone = "Europe/Berlin"; - - environment.variables = { - EDITOR = "hx"; - VISUAL = "hx"; - FLAKE = "/home/lilith/nixos"; - }; -} diff --git a/system/fonts.nix b/system/fonts.nix deleted file mode 100644 index 3505b118..00000000 --- a/system/fonts.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - fonts.packages = with pkgs; [ - nerd-fonts.jetbrains-mono - twemoji-color-font - ]; -} diff --git a/system/networking.nix b/system/networking.nix deleted file mode 100644 index 7c25b5e2..00000000 --- a/system/networking.nix +++ /dev/null @@ -1,19 +0,0 @@ -{...}: { - networking.networkmanager = { - enable = true; - wifi.macAddress = "random"; - ethernet.macAddress = "random"; - }; - - networking.nftables = { - enable = true; - }; - - networking.firewall = { - enable = true; - allowedTCPPorts = [ - 22 # ssh - 22000 # syncthing - ]; - }; -} diff --git a/system/nfs.nix b/system/nfs.nix deleted file mode 100644 index 03f7b533..00000000 --- a/system/nfs.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ ... }: { - fileSystems."/mnt/nas" = { - device = "nixserver:/share"; - fsType = "nfs"; - options = [ - "nfsvers=4.2" - "noauto" - "x-systemd.automount" - "x-systemd.idle-timeout=600" - "_netdev" - ]; - }; -} diff --git a/system/nix.nix b/system/nix.nix deleted file mode 100644 index 870b737e..00000000 --- a/system/nix.nix +++ /dev/null @@ -1,15 +0,0 @@ -{...}: { - nix = { - gc = { - automatic = true; - dates = "05:30"; - options = "--delete-older-than 7d"; - }; - settings = { - keep-outputs = true; - auto-optimise-store = true; - experimental-features = ["nix-command" "flakes"]; - trusted-users = ["root" "@wheel"]; - }; - }; -} diff --git a/system/packages.nix b/system/packages.nix deleted file mode 100644 index c0805ad6..00000000 --- a/system/packages.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ pkgs, ...}: { - environment.systemPackages = with pkgs; [ - age - compsize - duf - eza - bat - file - htop - btop - git - jq - yq - du-dust - ripgrep - sops - wget - wireguard-tools - zip - ]; -} diff --git a/system/persistence.nix b/system/persistence.nix deleted file mode 100644 index 359b9c80..00000000 --- a/system/persistence.nix +++ /dev/null @@ -1,60 +0,0 @@ -{impermanence, conf, lib, config, ...}: { - imports = [impermanence.nixosModule]; - - environment.persistence."/persist/data" = { - hideMounts = true; - directories = [ - "/etc/NetworkManager/system-connections" - "/var/lib/bluetooth" - ]; - files = []; - - users.lilith = { - directories = [ - ".config/syncthing" - ".config/sops" - ".config/keepassxc" - ".config/obsidian" - ".config/vesktop" - ".gnupg" - ".ssh" - - ".thunderbird" - ".mozilla" - - "nixos" - "sync" - "obsidian" - "code" - ".keepass" - ]; - files = []; - } - }; - - environment.persistence."/persist/cache" = { - hideMounts = true; - directories = [ - "/root/.cache/nix" - "/var/lib/btrfs" - "/var/lib/nixos" - "/var/lib/systemd/backlight" - "/var/lib/systemd/timers" - "/var/log" - ]; - files = [ - "/etc/machine-id" - ]; - - users.lilith = { - directories = [ - ".cache/nix" - ".cache/keepassxc" - ".cargo" - ".local/state/wireplumber" - "tmp" - ]; - files = []; - }; - }; -} diff --git a/system/ssh.nix b/system/ssh.nix deleted file mode 100644 index 3aeb7287..00000000 --- a/system/ssh.nix +++ /dev/null @@ -1,11 +0,0 @@ -{...}: { - networking.firewall.allowedTCPPorts = [22]; - services.openssh = { - enable = true; - ports = [22]; - settings = { - PermitRootLogin = "no"; - PasswordAuthentication = false; - }; - }; -} diff --git a/system/steam.nix b/system/steam.nix deleted file mode 100644 index d2df690f..00000000 --- a/system/steam.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - programs.steam.enable = true; - - programs.steam.remotePlay.openFirewall = true; -} diff --git a/system/syncthing.nix b/system/syncthing.nix deleted file mode 100644 index 27cb61bc..00000000 --- a/system/syncthing.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ config, ...}: let - host = networking.hostName; - in { - - sops.secrets."syncthing/key.pem" = { - sopsFile = ../hosts/${host}/secrets/default.yaml; - }; - sops.secrets."syncthing/cert.pem" = { - sopsFile = ../hosts/${host}/secrets/default.yaml; - }; - - services.syncthing = { - enable = true; - - user = lilith; - dataDir = "/home/lilith"; - configDir = "/home/lilith/.config/syncthing"; - - overrideDevices = true; - overrideFolders = true; - - settings = { - key = config.sops.secrets."syncthing/key.pem".path; - cert = config.sops.secrets."syncthing/cert.pem".path; - - devices = { - "phone" = {id = "C2CKYRP-72UNJRX-MUPZIUY-CCHQYGF-6T4NA6B-MO7AEZB-RSN5EAG-CN2JCAF";}; - "nixserver" = {id = "DW6GTZ3-3JPAHLO-UEB3LBL-AWOX3BT-QPI7ODT-OZ6Q4YR-K3KK22C-5RY3XQZ";}; - "lilith-pc" = {id = "37HHP4Q-NNQRQPQ-MVSIHAX-BK2A3GL-O6K4WXA-Y7ZQ5GZ-BY4UTFH-LG4HYAY";}; - "lilith-pad" = {id = "GQJA6WA-G5YZZSN-4OOQMVE-JPIR22N-VFHPY4O-XMRG37D-DALH4R2-7DCTMQK";}; - "lilith-old" = {id = "MSUZJ6K-4CIFE5D-ILO6FE4-SPRPTZI-VEWZQ7F-ECARCCF-2VLVMDQ-2HQUAAS";}; - }; - folders = { - "rdcj2-mfyb4" = { - path = "/home/lilith/sync"; - devices = ["phone" "nixserver" "lilith-pad" "lilith-pc" "lilith-old"]; - }; - "sdpfs-2beqd" = { - path = "/home/lilith/.keepass"; - devices = ["phone" "nixserver" "lilith-pad" "lilith-pc" "lilith-old"]; - }; - "7qim7-yzqpn" = { - path = "/home/lilith/obsidian"; - devices = ["phone" "nixserver" "lilith-pad" "lilith-pc" "lilith-old"]; - }; - }; - }; - }; -} diff --git a/system/users.nix b/system/users.nix deleted file mode 100644 index a71336e5..00000000 --- a/system/users.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ config, ...}: let - host = config.networking.hostName; - in { - users.mutableUsers = false; - users.users = { - lilith = { - isNormalUser = true; - uid = 1000; - extraGroups = [ "wheel" "networkmanager" ]; - hashedPasswordFile = config.sops.secrets."user/password".path; - }; - }; - - sops.secrets = { - "user/password" = { - sopsFile = ../hosts/${host}/secrets/default.yaml; - neededForUsers = true; - }; - "user/ssh/private" = { - sopsFile = ../hosts/${conf.hostname}/secrets/default.yaml; - path = "/home/lilith/.ssh/id_ed25519"; - owner = "lilith"; - }; - "user/ssh/public" = { - sopsFile = ../hosts/${conf.hostname}/secrets/default.yaml; - path = "/home/lilith/.ssh/id_ed25519.pub"; - owner = "lilith"; - }; - }; -} diff --git a/system/wayland.nix b/system/wayland.nix deleted file mode 100644 index 57faec4d..00000000 --- a/system/wayland.nix +++ /dev/null @@ -1,24 +0,0 @@ -{...}: { - hardware.graphics.enable = true; - - security.polkit.enable = true; - security.pam.services.hyprlock = {}; - - services.dbus.enable = true; - - programs.hyprland.enable = true; - - services.greetd = { - enable = true; - settings = { - default_session = { - user = "lilith"; - command = "Hyprland"; - }; - initial_session = { - user = "lilith"; - command = "Hyprland"; - }; - }; - }; -} diff --git a/system/zsh.nix b/system/zsh.nix deleted file mode 100644 index ad14ac47..00000000 --- a/system/zsh.nix +++ /dev/null @@ -1,4 +0,0 @@ -{pkgs, ...}: { - programs.zsh.enable = true; - users.defaultUserShell = pkgs.zsh; -}