diff --git a/hosts/default.nix b/hosts/default.nix index 1c93ddf..3000923 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,5 +1,6 @@ { inputs, + pkgs, config, lib, ... @@ -9,6 +10,13 @@ let userName = "moons"; + unstable = import inputs.nixpkgs-unstable { + inherit (pkgs) system; + config = { + allowUnfree = true; + }; + }; + mkSystem = { host, @@ -21,11 +29,14 @@ let nixosSystem { inherit system; modules = [ + { + nixpkgs.config.allowUnfree = true; + } ../profiles/${profile}.nix ./${host}/default.nix ] ++ extraModules; - specialArgs = { inherit inputs userName; }; + specialArgs = { inherit inputs userName unstable; }; }; in { diff --git a/modules/nix/boot/nfs.nix b/modules/nix/boot/nfs.nix index 7c359a2..26b609b 100644 --- a/modules/nix/boot/nfs.nix +++ b/modules/nix/boot/nfs.nix @@ -1,3 +1,4 @@ _: { boot.supportedFilesystems = [ "nfs" ]; + fuse.userAllowOther = true; } diff --git a/modules/nix/noctalia.nix b/modules/nix/noctalia.nix new file mode 100644 index 0000000..e2d3efb --- /dev/null +++ b/modules/nix/noctalia.nix @@ -0,0 +1,10 @@ +{ + pkgs, + inputs, + ... +}: +{ + environment.systemPackages = with pkgs; [ + inputs.noctalia.packages.${system}.default + ]; +} diff --git a/modules/nix/power.nix b/modules/nix/power.nix new file mode 100644 index 0000000..c64097d --- /dev/null +++ b/modules/nix/power.nix @@ -0,0 +1,14 @@ +_: { + boot.kernelParams = [ + "mem_sleep_default=deep" + ]; + + powerManagement = { + enable = true; + powertop.enable = true; + }; + + services.power-profiles-daemon.enable = true; + services.tlp.enable = false; + services.upower.enable = true; +} diff --git a/modules/nix/secure-boot.nix b/modules/nix/secure-boot.nix new file mode 100644 index 0000000..97f7656 --- /dev/null +++ b/modules/nix/secure-boot.nix @@ -0,0 +1,21 @@ +{ + inputs, + lib, + ... +}: +{ + imports = [ + inputs.lanzaboote.nixosModules.lanzaboote + ]; + + boot.loader = { + systemd-boot.enable = lib.mkForce false; + efi.canTouchEfiVariables = true; + efi.efiSysMountPoint = "/boot"; + }; + + boot.lanzaboote = { + enable = true; + pkiBundle = "/var/lib/sbctl"; + }; +} diff --git a/profiles/base.nix b/profiles/base.nix index c22cfec..6590473 100644 --- a/profiles/base.nix +++ b/profiles/base.nix @@ -1,4 +1,8 @@ -{ userName, ... }: +{ + pkgs, + userName, + ... +}: { imports = [ ../modules/nix/boot @@ -8,6 +12,26 @@ ../modules/nix/user.nix ../modules/nix/network ]; + + programs = { + zsh.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = false; + }; + }; + + environment.systemPackages = with pkgs; [ + htop + btop # Simple Terminal Based System Monitor + unrar # Tool For Handling .rar Files + unzip # Tool For Handling .zip Files + wget # Tool For Fetching Files With Links + curl # Tool For Fetching Files With Links + git # Version Control System + unstable.msedit # Microsoft Editor + ]; + home-manager.users.${userName}.imports = [ ]; } diff --git a/profiles/cli-minimal.nix b/profiles/cli-minimal.nix index 64717e8..d91ace9 100644 --- a/profiles/cli-minimal.nix +++ b/profiles/cli-minimal.nix @@ -1,7 +1,35 @@ -{ userName, ... }: +{ + pkgs, + userName, + ... +}: { imports = [ ./base.nix ]; + programs = { + java = { + enable = true; + package = pkgs.jdk25; + }; + }; + + environment.systemPackages = with pkgs; [ + nil # Nix Language Server + docker # Containerization Platform + tio # A Simple TTY Terminal I/O Application + sqlite # Vscode Raycast Extension Dependency + oxker # Docker TUI Tool + jdk25 # Java Development Kit 25 + maven # Java Build Tool + gradle # Java Build Tool + python312 # Python 3.12 + uv # Universal Virtual Environment Manager For Python + bun # A Fast JavaScript Runtime Like Node.js And Deno + unstable.claude-code # Anthropic's AI Assistant + unstable.codex # OpenAI's Code Generation Model + unstable.opencode # Coding AI Assistant + ]; + home-manager.users.${userName}.imports = [ ]; } diff --git a/profiles/gui.nix b/profiles/gui.nix index e60dcf3..f2f666d 100644 --- a/profiles/gui.nix +++ b/profiles/gui.nix @@ -1,4 +1,8 @@ -{ userName, ... }: +{ + pkgs, + userName, + ... +}: { imports = [ ./cli-minimal.nix @@ -8,6 +12,27 @@ ../modules/nix/greetd.nix ../modules/nix/i18n.nix ../modules/nix/kde.nix + ../modules/nix/noctalia.nix ]; + + programs = { + niri.enable = true; + xwayland.enable = true; + dconf.enable = true; + seahorse.enable = true; + }; + + environment.systemPackages = with pkgs; [ + tuigreet # The Login Manager (Sometimes Referred To As Display Manager) + uwsm # Universal Wayland Session Manager (optional must be enabled) + alacritty # A GPU Accelerated Terminal Emulator + fuzzel # A Simple And Lightweight Application Launcher + unstable.ghostty # A Fast And Minimal Terminal Emulator For Wayland + xwayland-satellite # A Helper For Running X11 Applications In Wayland + slurp # A Tool For Selecting A Region Of The Screen + grim # A Tool For Taking Screenshots In Wayland with slurp + wf-recorder # A Screen Recorder For Wayland + ]; + home-manager.users.${userName}.imports = [ ]; } diff --git a/profiles/laptop.nix b/profiles/laptop.nix index 466a1ef..f23890a 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -1,10 +1,21 @@ -{ userName, ... }: +{ + pkgs, + userName, + ... +}: { imports = [ ./gui.nix ../modules/nix/bluetooth.nix ../modules/nix/fingerprint.nix ../modules/nix/network/wifi.nix + ../modules/nix/power.nix ]; + + environment.systemPackages = with pkgs; [ + tailscale # Zero-Config VPN + sbctl # Secure Boot Key Management Tool + ]; + home-manager.users.${userName}.imports = [ ]; }