nix: add polder home

This commit is contained in:
js0ny 2025-10-21 17:39:23 +00:00
parent 04492a62c2
commit 8bcd089b3a
4 changed files with 108 additions and 98 deletions

View file

@ -28,98 +28,100 @@
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
}; };
outputs = outputs = {
{ self,
self, nixpkgs,
nixpkgs, nix-flatpak,
nix-flatpak, nix-darwin,
nix-darwin, home-manager,
home-manager, plasma-manager,
plasma-manager, nur,
nur, winboat,
winboat, caelestia-shell,
caelestia-shell, agenix,
agenix, ...
... } @ inputs: let
}@inputs: overlays = [
let nur.overlays.default
overlays = [ (final: prev: {
nur.overlays.default winboat = winboat.packages.x86_64-linux.winboat;
(final: prev: { caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell;
winboat = winboat.packages.x86_64-linux.winboat; })
caelestia-shell = caelestia-shell.packages.x86_64-linux.caelestia-shell; ];
}) forSystem = system:
]; import nixpkgs {
forSystem = inherit system overlays;
system: config.allowUnfree = true;
import nixpkgs { };
inherit system overlays; specialArgs = {inherit inputs overlays;};
config.allowUnfree = true; nixosHosts = [
}; "zp"
specialArgs = { inherit inputs overlays; }; "zephyrus"
nixosHosts = [ "nixvirt"
"zp" "polder"
"zephyrus" ];
"nixvirt"
"polder"
];
mkNixosSystem = mkNixosSystem = hostname:
hostname: nixpkgs.lib.nixosSystem {
nixpkgs.lib.nixosSystem { system = "x86_64-linux";
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";
inherit specialArgs; inherit specialArgs;
modules = [ 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 = { darwinConfigurations."zen" = nix-darwin.lib.darwinSystem {
js0ny = home-manager.lib.homeManagerConfiguration { system = "aarch64-darwin";
pkgs = forSystem "x86_64-linux"; inherit specialArgs;
extraSpecialArgs = specialArgs; modules = [
modules = [ ./hosts/zen
./users/js0ny ];
]; };
};
"js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration { homeConfigurations = {
pkgs = forSystem "x86_64-linux"; js0ny = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs; pkgs = forSystem "x86_64-linux";
modules = [ extraSpecialArgs = specialArgs;
./users/js0ny/zephyrus.nix modules = [
plasma-manager.homeModules.plasma-manager ./users/js0ny
nix-flatpak.homeManagerModules.nix-flatpak ];
]; };
}; "js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration {
"js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration { pkgs = forSystem "x86_64-linux";
pkgs = forSystem "x86_64-linux"; extraSpecialArgs = specialArgs;
extraSpecialArgs = specialArgs; modules = [
modules = [ ./users/js0ny/zephyrus.nix
./users/js0ny/nixvirt.nix plasma-manager.homeModules.plasma-manager
]; nix-flatpak.homeManagerModules.nix-flatpak
}; ];
"js0ny@zen" = home-manager.lib.homeManagerConfiguration { };
pkgs = forSystem "aarch64-darwin"; "js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration {
extraSpecialArgs = specialArgs; pkgs = forSystem "x86_64-linux";
modules = [ extraSpecialArgs = specialArgs;
./users/js0ny/zen.nix 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
];
}; };
}; };
};
} }

View file

@ -2,10 +2,8 @@
{ {
config, config,
pkgs, pkgs,
nix-flatpak,
... ...
}: }: {
{
imports = [ imports = [
# impure build # impure build
/etc/nixos/hardware-configuration.nix /etc/nixos/hardware-configuration.nix
@ -15,7 +13,7 @@
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda"; 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; boot.loader.grub.useOSProber = true;
services.qemuGuest.enable = true; services.qemuGuest.enable = true;
services.spice-vdagentd.enable = true; services.spice-vdagentd.enable = true;
@ -27,7 +25,7 @@
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {
PermitRootLogin = "yes"; PermitRootLogin = "no";
}; };
}; };
@ -51,7 +49,10 @@
]; ];
firewall = { firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 22 ]; allowedTCPPorts = [22];
}; };
}; };
environment.systemPackages = with pkgs; [
rclone
];
} }

View file

@ -2,12 +2,6 @@
{pkgs, ...}: let {pkgs, ...}: let
username = "js0ny"; username = "js0ny";
in { 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.username = username;
home.homeDirectory = home.homeDirectory =
if pkgs.stdenv.isDarwin if pkgs.stdenv.isDarwin

View file

@ -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";
}