From 8bcd089b3a0a1c81101f7e4ecf0f8cd105030bde Mon Sep 17 00:00:00 2001 From: js0ny Date: Tue, 21 Oct 2025 17:39:23 +0000 Subject: [PATCH] nix: add polder home --- nixcfgs/flake.nix | 174 ++++++++++++++++--------------- nixcfgs/hosts/polder/default.nix | 13 +-- nixcfgs/users/js0ny/default.nix | 6 -- nixcfgs/users/js0ny/polder.nix | 13 +++ 4 files changed, 108 insertions(+), 98 deletions(-) create mode 100644 nixcfgs/users/js0ny/polder.nix diff --git a/nixcfgs/flake.nix b/nixcfgs/flake.nix index 5e60974..b91072e 100644 --- a/nixcfgs/flake.nix +++ b/nixcfgs/flake.nix @@ -28,98 +28,100 @@ agenix.url = "github:ryantm/agenix"; }; - outputs = - { - self, - nixpkgs, - nix-flatpak, - nix-darwin, - home-manager, - plasma-manager, - nur, - winboat, - caelestia-shell, - agenix, - ... - }@inputs: - let - overlays = [ - nur.overlays.default - (final: prev: { - winboat = winboat.packages.x86_64-linux.winboat; - caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell; - }) - ]; - forSystem = - system: - import nixpkgs { - inherit system overlays; - config.allowUnfree = true; - }; - specialArgs = { inherit inputs overlays; }; - nixosHosts = [ - "zp" - "zephyrus" - "nixvirt" - "polder" - ]; + outputs = { + self, + nixpkgs, + nix-flatpak, + nix-darwin, + home-manager, + plasma-manager, + nur, + winboat, + caelestia-shell, + agenix, + ... + } @ inputs: let + overlays = [ + nur.overlays.default + (final: prev: { + winboat = winboat.packages.x86_64-linux.winboat; + caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell; + }) + ]; + forSystem = system: + import nixpkgs { + inherit system overlays; + config.allowUnfree = true; + }; + specialArgs = {inherit inputs overlays;}; + nixosHosts = [ + "zp" + "zephyrus" + "nixvirt" + "polder" + ]; - mkNixosSystem = - hostname: - nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - inherit specialArgs; - modules = [ - agenix.nixosModules.default - ./hosts/${hostname} - { nixpkgs.overlays = overlays; } - ]; - }; - in - { - # This will automatically generate nixOS config for `nixosHosts' - # Include the module ./hosts/${hostname} by default. - nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem; - - darwinConfigurations."zen" = nix-darwin.lib.darwinSystem { - system = "aarch64-darwin"; + mkNixosSystem = hostname: + nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; inherit specialArgs; modules = [ - ./hosts/zen + agenix.nixosModules.default + ./hosts/${hostname} + {nixpkgs.overlays = overlays;} ]; }; + in { + # This will automatically generate nixOS config for `nixosHosts' + # Include the module ./hosts/${hostname} by default. + nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem; - homeConfigurations = { - js0ny = home-manager.lib.homeManagerConfiguration { - pkgs = forSystem "x86_64-linux"; - extraSpecialArgs = specialArgs; - modules = [ - ./users/js0ny - ]; - }; - "js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration { - pkgs = forSystem "x86_64-linux"; - extraSpecialArgs = specialArgs; - modules = [ - ./users/js0ny/zephyrus.nix - plasma-manager.homeModules.plasma-manager - nix-flatpak.homeManagerModules.nix-flatpak - ]; - }; - "js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration { - pkgs = forSystem "x86_64-linux"; - extraSpecialArgs = specialArgs; - modules = [ - ./users/js0ny/nixvirt.nix - ]; - }; - "js0ny@zen" = home-manager.lib.homeManagerConfiguration { - pkgs = forSystem "aarch64-darwin"; - extraSpecialArgs = specialArgs; - modules = [ - ./users/js0ny/zen.nix - ]; - }; + darwinConfigurations."zen" = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + inherit specialArgs; + modules = [ + ./hosts/zen + ]; + }; + + homeConfigurations = { + js0ny = home-manager.lib.homeManagerConfiguration { + pkgs = forSystem "x86_64-linux"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny + ]; + }; + "js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration { + pkgs = forSystem "x86_64-linux"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny/zephyrus.nix + plasma-manager.homeModules.plasma-manager + nix-flatpak.homeManagerModules.nix-flatpak + ]; + }; + "js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration { + pkgs = forSystem "x86_64-linux"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny/nixvirt.nix + ]; + }; + "js0ny@polder" = home-manager.lib.homeManagerConfiguration { + pkgs = forSystem "x86_64-linux"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny/polder.nix + ]; + }; + "js0ny@zen" = home-manager.lib.homeManagerConfiguration { + pkgs = forSystem "aarch64-darwin"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny/zen.nix + ]; }; }; + }; } diff --git a/nixcfgs/hosts/polder/default.nix b/nixcfgs/hosts/polder/default.nix index cfb2aba..daa8b2d 100644 --- a/nixcfgs/hosts/polder/default.nix +++ b/nixcfgs/hosts/polder/default.nix @@ -2,10 +2,8 @@ { config, pkgs, - nix-flatpak, ... -}: -{ +}: { imports = [ # impure build /etc/nixos/hardware-configuration.nix @@ -15,7 +13,7 @@ boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; - boot.kernelParams = [ "console=ttyS0,115200n8" "console=tty0" ]; + boot.kernelParams = ["console=ttyS0,115200n8" "console=tty0"]; boot.loader.grub.useOSProber = true; services.qemuGuest.enable = true; services.spice-vdagentd.enable = true; @@ -27,7 +25,7 @@ services.openssh = { enable = true; settings = { - PermitRootLogin = "yes"; + PermitRootLogin = "no"; }; }; @@ -51,7 +49,10 @@ ]; firewall = { enable = true; - allowedTCPPorts = [ 22 ]; + allowedTCPPorts = [22]; }; }; + environment.systemPackages = with pkgs; [ + rclone + ]; } diff --git a/nixcfgs/users/js0ny/default.nix b/nixcfgs/users/js0ny/default.nix index 6085b9d..182ec3b 100644 --- a/nixcfgs/users/js0ny/default.nix +++ b/nixcfgs/users/js0ny/default.nix @@ -2,12 +2,6 @@ {pkgs, ...}: let username = "js0ny"; in { - imports = [ - ../../modules/home/programs/fzf.nix - ../../modules/home/programs/lsd.nix - ../../modules/home/programs/zoxide.nix - ]; - nixpkgs.config.allowUnfree = true; home.username = username; home.homeDirectory = if pkgs.stdenv.isDarwin diff --git a/nixcfgs/users/js0ny/polder.nix b/nixcfgs/users/js0ny/polder.nix new file mode 100644 index 0000000..730d324 --- /dev/null +++ b/nixcfgs/users/js0ny/polder.nix @@ -0,0 +1,13 @@ +# ~/.config/nixcfgs/users/js0ny/polder.nix +{...}: { + imports = [ + ./default.nix + ./programs/shell.nix + ../../modules/home/dev/nix.nix + ../../modules/home/programs/fzf.nix + ../../modules/home/programs/lsd.nix + ../../modules/home/programs/nvim.nix + ]; + + home.stateVersion = "25.05"; +}