diff --git a/flake.lock b/flake.lock index 89b3dbd..ea11deb 100644 --- a/flake.lock +++ b/flake.lock @@ -128,11 +128,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1794552581, - "narHash": "sha256-qXFIqA6FCcx7XeDzw0ZNlkDT9UiCzrNDwK8RuU8RcHM=", + "lastModified": 1794872590, + "narHash": "sha256-E+XLAfnC7+bdr4qlEgRv6cdGmiqTU5oeFNKCha7epqQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f1e5c356f35d07e7b71a6b5e6c9338e0b029e0c0", + "rev": "f68407657ad294471eb4b2e65d193df26edf729f", "type": "github" }, "original": { @@ -176,11 +176,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1793341285, - "narHash": "sha256-LOv16TsMYV2/8BUYnhSxHkOASe7es2ORbqMeLlZJ8Hc=", - "rev": "1c89083e451e891152365b799595cf7790a43325", + "lastModified": 1794537146, + "narHash": "sha256-bTKSclXJAmo9qdxPedTBHUGr8awPr4BrbOoOutJsYIc=", + "rev": "d5cc6833999746cffdfe0598f7bc801a57b887a9", "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1105037.1c89083e451e/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1119549.d5cc68339997/nixexprs.tar.xz" }, "original": { "type": "tarball", @@ -283,11 +283,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1793662659, - "narHash": "sha256-a+za5QCDlOe/PsuMlZiBcQ13cyiyOscK17BAJFu1/dE=", + "lastModified": 1794871977, + "narHash": "sha256-An9Qcr31Z+PmF4TlJWY6RkM4yPbBKc2vkyp6NctvMEk=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "13e6fed4eb99f809d390fb50f591bed6cb716dc0", + "rev": "cd7d88aca6db91899373d5574bb252547f4c8c2c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 39cdf49..04fb67e 100644 --- a/flake.nix +++ b/flake.nix @@ -67,7 +67,7 @@ modules = [ nix-flatpak.nixosModules.nix-flatpak skwd-wall.nixosModules.default - ./hosts/WarNyx/configuration.nix + ./hosts/Winter/WarNyx/configuration.nix ]; }; Reconix = nixpkgs.lib.nixosSystem { @@ -75,7 +75,7 @@ modules = [ nix-flatpak.nixosModules.nix-flatpak skwd-wall.nixosModules.default - ./hosts/Reconix/configuration.nix + ./hosts/Winter/Reconix/configuration.nix ]; }; }; diff --git a/home/Ekisha/WarNyx.nix b/home/Ekisha/WarNyx.nix deleted file mode 100644 index e0f845a..0000000 --- a/home/Ekisha/WarNyx.nix +++ /dev/null @@ -1,94 +0,0 @@ -# This is your home-manager configuration file -# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) -{ - inputs, - lib, - config, - pkgs, - ... -}: -let - username = "Ekisha"; -in -{ - # You can import other home-manager modules here - imports = [ - # If you want to use modules your own flake exports (from modules/home-manager): - # inputs.self.homeManagerModules.example - - # Or modules exported from other flakes (such as nix-colors): - # inputs.nix-colors.homeManagerModules.default - - # You can also split up your configuration and import pieces of it here: - # ./nvim.nix - - #../common/features/niri/niri.nix - ../common/features/spicetify.nix - ../common/features/yazi/yazi.nix - ../common/features/nvimConf.nix - ../common/features/shell.nix - ]; - - nixpkgs = { - # You can add overlays here - overlays = [ - # Add overlays your own flake exports (from overlays and pkgs dir): - inputs.self.overlays.additions - inputs.self.overlays.modifications - inputs.self.overlays.unstable-packages - - # You can also add overlays exported from other flakes: - # neovim-nightly-overlay.overlays.default - - # Or define it inline, for example: - # (final: prev: { - # hi = final.hello.overrideAttrs (oldAttrs: { - # patches = [ ./change-hello-to-hi.patch ]; - # }); - # }) - ]; - # Configure your nixpkgs instance - config = { - # Disable if you don't want unfree packages - allowUnfree = true; - }; - }; - - # --- xdg --- - #xdg.mimeApps = { - # enable = true; - # defaultApplications = { - # "inode/directory" = [ "kitty-open.desktop" ]; - # "image/jpeg" = [ "org.gnome.gThumb.desktop" ]; - # "image/png" = [ "org.gnome.gThumb.desktop" ]; - # "image/gif" = [ "org.gnome.gThumb.desktop" ]; - # "image/webp" = [ "org.gnome.gThumb.desktop" ]; - # "image/tiff" = [ "org.gnome.gThumb.desktop" ]; - # "image/bmp" = [ "org.gnome.gThumb.desktop" ]; - # }; - #}; - - home.packages = with pkgs; [ - # --- General utils --- - libreoffice - libresprite - hunspell - hunspellDicts.en_US - rose-pine-cursor # TODO: ensure change cursor - ]; - - home = { - username = username; - homeDirectory = "/home/${username}"; - }; - programs.home-manager.enable = true; - - # --- General utils --- - programs.quickshell.enable = true; - programs.obsidian = { - enable = true; - }; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - home.stateVersion = "25.11"; -} diff --git a/home/Ricky/dev/Ricky.nix b/home/Ricky/dev/nixos.nix similarity index 100% rename from home/Ricky/dev/Ricky.nix rename to home/Ricky/dev/nixos.nix diff --git a/home/Winter/Base.nix b/home/Winter/Base.nix index 0b2ed27..23e21d2 100644 --- a/home/Winter/Base.nix +++ b/home/Winter/Base.nix @@ -6,7 +6,7 @@ config, pkgs, ... -}: +}: { # You can import other home-manager modules here imports = [ @@ -19,11 +19,11 @@ # You can also split up your configuration and import pieces of it here: # ./nvim.nix - ../common/features/niri/niri.nix - ../common/features/spicetify.nix - ../common/features/yazi/yazi.nix - ../common/features/nvimConf.nix - ../common/features/shell.nix + ./common/features/niri/niri.nix + ./common/features/spicetify.nix + ./common/features/yazi/yazi.nix + ./common/features/nvimConf.nix + ./common/features/shell.nix ]; nixpkgs = { @@ -51,6 +51,27 @@ }; }; + home.packages = ( + (with pkgs; [ + # --- General utils --- + libreoffice # Microsoft replace + hunspell + hunspellDicts.en_US + ]) + ++ (with pkgs.unstablePkgs; [ + # --- Creative utils --- + obs-studio + shotcut + blockbench + libresprite # Pixel art + ]) + ); + + programs.home-manager.enable = true; + # --- General utils --- + programs.quickshell.enable = true; + programs.joplin-desktop.enable = true; + # --- xdg --- xdg.mimeApps = { enable = true; @@ -65,22 +86,6 @@ }; }; - home.packages = with pkgs; [ - # --- General utils --- - libreoffice #Microsoft replace - libresprite #Pixel art - hunspell - hunspellDicts.en_US - obs-studio - shotcut - blockbench - ]; - - programs.home-manager.enable = true; - - # --- General utils --- - programs.quickshell.enable = true; - programs.joplin-desktop.enable = true; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion home.stateVersion = "25.11"; diff --git a/home/Winter/Ekisha/WarNyx.nix b/home/Winter/Ekisha/WarNyx.nix new file mode 100644 index 0000000..9226427 --- /dev/null +++ b/home/Winter/Ekisha/WarNyx.nix @@ -0,0 +1,67 @@ +# This is your home-manager configuration file +# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) +{ + inputs, + lib, + config, + pkgs, + ... +}: +let + username = "Ekisha"; +in +{ + # You can import other home-manager modules here + imports = [ + # If you want to use modules your own flake exports (from modules/home-manager): + # inputs.self.homeManagerModules.example + + # Or modules exported from other flakes (such as nix-colors): + # inputs.nix-colors.homeManagerModules.default + + # You can also split up your configuration and import pieces of it here: + # ./nvim.nix + + ../Base.nix + ]; + + nixpkgs = { + # You can add overlays here + overlays = [ + # Add overlays your own flake exports (from overlays and pkgs dir): + inputs.self.overlays.additions + inputs.self.overlays.modifications + inputs.self.overlays.unstable-packages + + # You can also add overlays exported from other flakes: + # neovim-nightly-overlay.overlays.default + + # Or define it inline, for example: + # (final: prev: { + # hi = final.hello.overrideAttrs (oldAttrs: { + # patches = [ ./change-hello-to-hi.patch ]; + # }); + # }) + ]; + # Configure your nixpkgs instance + config = { + # Disable if you don't want unfree packages + allowUnfree = true; + }; + }; + + home.packages = ( + (with pkgs; [ + ]) + ++ (with pkgs.unstablePkgs; [ + ]) + ); + + home = { + username = username; + homeDirectory = "/home/${username}"; + }; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + home.stateVersion = "25.11"; +} diff --git a/home/Tester/WarNyx.nix b/home/Winter/Tester/WarNyx.nix similarity index 61% rename from home/Tester/WarNyx.nix rename to home/Winter/Tester/WarNyx.nix index 620e812..0378963 100644 --- a/home/Tester/WarNyx.nix +++ b/home/Winter/Tester/WarNyx.nix @@ -6,7 +6,7 @@ config, pkgs, ... -}: +}: let username = "Tester"; in @@ -22,11 +22,7 @@ in # You can also split up your configuration and import pieces of it here: # ./nvim.nix - ../common/features/niri/niri.nix - ../common/features/spicetify.nix - ../common/features/yazi/yazi.nix - ../common/features/nvimConf.nix - ../common/features/shell.nix + ../Base.nix ]; nixpkgs = { @@ -54,39 +50,17 @@ in }; }; - # --- xdg --- - xdg.mimeApps = { - enable = true; - defaultApplications = { - "inode/directory" = [ "kitty-open.desktop" ]; - "image/jpeg" = [ "org.gnome.gThumb.desktop" ]; - "image/png" = [ "org.gnome.gThumb.desktop" ]; - "image/gif" = [ "org.gnome.gThumb.desktop" ]; - "image/webp" = [ "org.gnome.gThumb.desktop" ]; - "image/tiff" = [ "org.gnome.gThumb.desktop" ]; - "image/bmp" = [ "org.gnome.gThumb.desktop" ]; - }; - }; - - home.packages = with pkgs; [ - # --- General utils --- - libreoffice - libresprite - hunspell - hunspellDicts.en_US - obs-studio - shotcut - ]; + home.packages = ( + (with pkgs; [ + ]) + ++ (with pkgs.unstablePkgs; [ + ]) + ); home = { username = username; homeDirectory = "/home/${username}"; }; - programs.home-manager.enable = true; - - # --- General utils --- - programs.quickshell.enable = true; - programs.joplin-desktop.enable = true; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion home.stateVersion = "25.11"; diff --git a/home/Winter/Reconix.nix b/home/Winter/Winter/Reconix.nix similarity index 69% rename from home/Winter/Reconix.nix rename to home/Winter/Winter/Reconix.nix index a235355..d9d2721 100644 --- a/home/Winter/Reconix.nix +++ b/home/Winter/Winter/Reconix.nix @@ -6,7 +6,7 @@ config, pkgs, ... -}: +}: let username = "Winter"; in @@ -22,11 +22,7 @@ in # You can also split up your configuration and import pieces of it here: # ./nvim.nix - ../common/features/niri/niri.nix - ../common/features/spicetify.nix - ../common/features/yazi/yazi.nix - ../common/features/nvimConf.nix - ../common/features/shell.nix + ../Base.nix ]; nixpkgs = { @@ -53,34 +49,18 @@ in allowUnfree = true; }; }; - # --- xdg --- - xdg.mimeApps = { - enable = true; - defaultApplications = { - "inode/directory" = [ "kitty-open.desktop" ]; - }; - }; - home.packages = with pkgs; [ - # --- General utils --- - libreoffice - libresprite - hunspell - hunspellDicts.en_US - rose-pine-cursor # TODO: ensure change cursor - ]; + home.packages = ( + (with pkgs; [ + ]) + ++ (with pkgs.unstablePkgs; [ + ]) + ); home = { username = username; homeDirectory = "/home/${username}"; }; - programs.home-manager.enable = true; - - # --- General utils --- - programs.quickshell.enable = true; - programs.obsidian = { - enable = true; - }; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion home.stateVersion = "25.11"; diff --git a/home/Winter/WarNyx.nix b/home/Winter/Winter/WarNyx.nix similarity index 61% rename from home/Winter/WarNyx.nix rename to home/Winter/Winter/WarNyx.nix index 735b570..d3134af 100644 --- a/home/Winter/WarNyx.nix +++ b/home/Winter/Winter/WarNyx.nix @@ -6,7 +6,7 @@ config, pkgs, ... -}: +}: let username = "Winter"; in @@ -22,11 +22,7 @@ in # You can also split up your configuration and import pieces of it here: # ./nvim.nix - ../common/features/niri/niri.nix - ../common/features/spicetify.nix - ../common/features/yazi/yazi.nix - ../common/features/nvimConf.nix - ../common/features/shell.nix + ../Base.nix ]; nixpkgs = { @@ -54,33 +50,11 @@ in }; }; - # --- xdg --- - xdg.mimeApps = { - enable = true; - defaultApplications = { - "inode/directory" = [ "kitty-open.desktop" ]; - "image/jpeg" = [ "org.gnome.gThumb.desktop" ]; - "image/png" = [ "org.gnome.gThumb.desktop" ]; - "image/gif" = [ "org.gnome.gThumb.desktop" ]; - "image/webp" = [ "org.gnome.gThumb.desktop" ]; - "image/tiff" = [ "org.gnome.gThumb.desktop" ]; - "image/bmp" = [ "org.gnome.gThumb.desktop" ]; - }; - }; - home.packages = ( (with pkgs; [ - # --- General utils --- - libreoffice # Microsoft replace - hunspell - hunspellDicts.en_US + jdk21 ]) ++ (with pkgs.unstablePkgs; [ - # --- Creative utils --- - obs-studio - shotcut - blockbench - libresprite # Pixel art ]) ); @@ -88,11 +62,6 @@ in username = username; homeDirectory = "/home/${username}"; }; - programs.home-manager.enable = true; - - # --- General utils --- - programs.quickshell.enable = true; - programs.joplin-desktop.enable = true; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion home.stateVersion = "25.11"; diff --git a/home/common/example.nix b/home/Winter/common/example.nix similarity index 84% rename from home/common/example.nix rename to home/Winter/common/example.nix index 89d02af..296cd2a 100644 --- a/home/common/example.nix +++ b/home/Winter/common/example.nix @@ -8,7 +8,7 @@ ... }: let - username = ""; + username = "Winter"; #FIXME in { # You can import other home-manager modules here @@ -22,11 +22,7 @@ in # You can also split up your configuration and import pieces of it here: # ./nvim.nix - #../common/features/niri/niri.nix - #../common/features/spicetify.nix - #../common/features/yazi/yazi.nix - #../common/features/nvimConf.nix - #../common/features/shell.nix + ../Base.nix ]; nixpkgs = { @@ -54,14 +50,17 @@ in }; }; - home.packages = with pkgs; [ - ]; + home.packages = ( + (with pkgs; [ + ]) + ++ (with pkgs.unstablePkgs; [ + ]) + ); home = { username = username; homeDirectory = "/home/${username}"; }; - programs.home-manager.enable = true; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion home.stateVersion = "25.11"; diff --git a/home/common/features/niri/config.kdl b/home/Winter/common/features/niri/config.kdl similarity index 100% rename from home/common/features/niri/config.kdl rename to home/Winter/common/features/niri/config.kdl diff --git a/home/common/features/niri/niri.nix b/home/Winter/common/features/niri/niri.nix similarity index 100% rename from home/common/features/niri/niri.nix rename to home/Winter/common/features/niri/niri.nix diff --git a/home/common/features/nvimConf.nix b/home/Winter/common/features/nvimConf.nix similarity index 100% rename from home/common/features/nvimConf.nix rename to home/Winter/common/features/nvimConf.nix diff --git a/home/common/features/shell.nix b/home/Winter/common/features/shell.nix similarity index 100% rename from home/common/features/shell.nix rename to home/Winter/common/features/shell.nix diff --git a/home/common/features/spicetify.nix b/home/Winter/common/features/spicetify.nix similarity index 100% rename from home/common/features/spicetify.nix rename to home/Winter/common/features/spicetify.nix diff --git a/home/common/features/yazi/catppuccin-frappe/README.md b/home/Winter/common/features/yazi/catppuccin-frappe/README.md similarity index 100% rename from home/common/features/yazi/catppuccin-frappe/README.md rename to home/Winter/common/features/yazi/catppuccin-frappe/README.md diff --git a/home/common/features/yazi/catppuccin-frappe/flavor.toml b/home/Winter/common/features/yazi/catppuccin-frappe/flavor.toml similarity index 100% rename from home/common/features/yazi/catppuccin-frappe/flavor.toml rename to home/Winter/common/features/yazi/catppuccin-frappe/flavor.toml diff --git a/home/common/features/yazi/catppuccin-frappe/preview.png b/home/Winter/common/features/yazi/catppuccin-frappe/preview.png similarity index 100% rename from home/common/features/yazi/catppuccin-frappe/preview.png rename to home/Winter/common/features/yazi/catppuccin-frappe/preview.png diff --git a/home/common/features/yazi/catppuccin-frappe/tmtheme.xml b/home/Winter/common/features/yazi/catppuccin-frappe/tmtheme.xml similarity index 100% rename from home/common/features/yazi/catppuccin-frappe/tmtheme.xml rename to home/Winter/common/features/yazi/catppuccin-frappe/tmtheme.xml diff --git a/home/common/features/yazi/yazi.nix b/home/Winter/common/features/yazi/yazi.nix similarity index 100% rename from home/common/features/yazi/yazi.nix rename to home/Winter/common/features/yazi/yazi.nix diff --git a/home/Winter/minecraft.nix b/home/Winter/servers/minecraft.nix similarity index 71% rename from home/Winter/minecraft.nix rename to home/Winter/servers/minecraft.nix index e4b0127..03ad825 100644 --- a/home/Winter/minecraft.nix +++ b/home/Winter/servers/minecraft.nix @@ -13,10 +13,16 @@ in { # You can import other home-manager modules here imports = [ - ../common/features/niri/niri.nix - ../common/features/yazi/yazi.nix - ../common/features/nvimConf.nix - ../common/features/shell.nix + # If you want to use modules your own flake exports (from modules/home-manager): + # inputs.self.homeManagerModules.example + + # Or modules exported from other flakes (such as nix-colors): + # inputs.nix-colors.homeManagerModules.default + + # You can also split up your configuration and import pieces of it here: + # ./nvim.nix + + ../Base.nix ]; nixpkgs = { @@ -44,14 +50,18 @@ in }; }; - home.packages = with pkgs; [ - ]; + home.packages = ( + (with pkgs; [ + jdk21 + ]) + ++ (with pkgs.unstablePkgs; [ + ]) + ); home = { username = username; homeDirectory = "/home/${username}"; }; - programs.home-manager.enable = true; # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion home.stateVersion = "25.11"; diff --git a/hosts/common/example.nix b/hosts/Ricky/common/example.nix similarity index 96% rename from hosts/common/example.nix rename to hosts/Ricky/common/example.nix index 02f5c20..ddce6eb 100644 --- a/hosts/common/example.nix +++ b/hosts/Ricky/common/example.nix @@ -61,7 +61,7 @@ in extraSpecialArgs = { inherit inputs; }; backupFileExtension = "backup"; users = { - EXAMPLE = import ../../home/EXAMPLE/${hostname}.nix; # FIXME + EXAMPLE = import ../../../home/Ricky/EXAMPLE/${hostname}.nix; # FIXME }; }; diff --git a/hosts/common/users/dev/default.nix b/hosts/Ricky/common/users/dev/default.nix similarity index 84% rename from hosts/common/users/dev/default.nix rename to hosts/Ricky/common/users/dev/default.nix index 39103ad..2bf9bbb 100644 --- a/hosts/common/users/dev/default.nix +++ b/hosts/Ricky/common/users/dev/default.nix @@ -30,7 +30,7 @@ in { }; # TODO: ensure correct paths - home-manager.users.${username} = import ../../../../home/${username}/${config.networking.hostName}.nix; + home-manager.users.${username} = import ../../../../../home/Ricky/${username}/${config.networking.hostName}.nix; security.pam.services = { swaylock = {}; diff --git a/hosts/common/users/example.nix b/hosts/Ricky/common/users/example.nix similarity index 85% rename from hosts/common/users/example.nix rename to hosts/Ricky/common/users/example.nix index f0eb068..73fd503 100644 --- a/hosts/common/users/example.nix +++ b/hosts/Ricky/common/users/example.nix @@ -31,7 +31,7 @@ in { }; - home-manager.users.${username} = import ../../../../home/${username}/${config.networking.hostName}.nix; + home-manager.users.${username} = import ../../../../home/Ricky/${username}/${config.networking.hostName}.nix; security.pam.services = { swaylock = {}; diff --git a/hosts/Ricky/configuration.nix b/hosts/Ricky/nixos/configuration.nix similarity index 96% rename from hosts/Ricky/configuration.nix rename to hosts/Ricky/nixos/configuration.nix index d0685a3..2e32a56 100644 --- a/hosts/Ricky/configuration.nix +++ b/hosts/Ricky/nixos/configuration.nix @@ -8,7 +8,7 @@ ... }: let - hostname = "Ricky"; + hostname = "nixos"; in { # You can import other NixOS modules here @@ -62,7 +62,7 @@ in extraSpecialArgs = { inherit inputs; }; backupFileExtension = "backup"; users = { - dev = import ../../home/Ricky/dev/${hostname}.nix; + dev = import ../../../home/Ricky/dev/${hostname}.nix; # FIXME }; }; diff --git a/hosts/Ricky/hardware-configuration.nix b/hosts/Ricky/nixos/hardware-configuration.nix similarity index 100% rename from hosts/Ricky/hardware-configuration.nix rename to hosts/Ricky/nixos/hardware-configuration.nix diff --git a/hosts/Reconix/configuration.nix b/hosts/Winter/Reconix/configuration.nix similarity index 97% rename from hosts/Reconix/configuration.nix rename to hosts/Winter/Reconix/configuration.nix index 221c5b1..2448242 100644 --- a/hosts/Reconix/configuration.nix +++ b/hosts/Winter/Reconix/configuration.nix @@ -62,7 +62,7 @@ in extraSpecialArgs = { inherit inputs; }; backupFileExtension = "backup"; users = { - Winter = import ../../home/Winter/${hostname}.nix; # FIXME + Winter = import ../../home/Winter/Winter/${hostname}.nix; }; }; diff --git a/hosts/Reconix/hardware-configuration.nix b/hosts/Winter/Reconix/hardware-configuration.nix similarity index 100% rename from hosts/Reconix/hardware-configuration.nix rename to hosts/Winter/Reconix/hardware-configuration.nix diff --git a/hosts/WarNyx/configuration.nix b/hosts/Winter/WarNyx/configuration.nix similarity index 90% rename from hosts/WarNyx/configuration.nix rename to hosts/Winter/WarNyx/configuration.nix index 85df60b..679afba 100644 --- a/hosts/WarNyx/configuration.nix +++ b/hosts/Winter/WarNyx/configuration.nix @@ -33,7 +33,7 @@ in ../common/features/DesktopNiri.nix ../common/features/DesktopKDEPlasma.nix ../common/features/Applications.nix - ../common/features/servers/minecraft.nix + ../common/servers/minecraft.nix inputs.home-manager.nixosModules.home-manager ]; @@ -67,12 +67,6 @@ in home-manager = { extraSpecialArgs = { inherit inputs; }; backupFileExtension = "backup"; - users = { - Winter = import ../../home/Winter/${hostname}.nix; - minecraft = import ../../home/Winter/minecraft.nix; - Ekisha = import ../../home/Ekisha/${hostname}.nix; - Tester = import ../../home/Tester/${hostname}.nix; - }; }; networking.extraHosts = " diff --git a/hosts/WarNyx/hardware-configuration.nix b/hosts/Winter/WarNyx/hardware-configuration.nix similarity index 100% rename from hosts/WarNyx/hardware-configuration.nix rename to hosts/Winter/WarNyx/hardware-configuration.nix diff --git a/hosts/Winter/common/example.nix b/hosts/Winter/common/example.nix new file mode 100644 index 0000000..36ffcdc --- /dev/null +++ b/hosts/Winter/common/example.nix @@ -0,0 +1,86 @@ +# This is your system's configuration file. +# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) +{ + inputs, + lib, + config, + pkgs, + ... +}: +let + hostname = ""; #FIXME, also ensure /home/username/hostname.nix +in +{ + # You can import other NixOS modules here + imports = [ + # If you want to use modules your own flake exports (from modules/nixos): + # inputs.self.nixosModules.example + + # Or modules from other flakes (such as nixos-hardware): + # inputs.hardware.nixosModules.common-cpu-amd + # inputs.hardware.nixosModules.common-ssd + + ./hardware-configuration.nix + + ../common/users/Winter/default.nix + #../common/global/default.nix + #../common/features/Desktop.nix + #../common/features/Applications.nix + #../common/features/servers/minecraft.nix + + inputs.home-manager.nixosModules.home-manager + ]; + + nixpkgs = { + # You can add overlays here + overlays = [ + # Add overlays your own flake exports (from overlays and pkgs dir): + inputs.self.overlays.additions + inputs.self.overlays.modifications + inputs.self.overlays.unstable-packages + + # You can also add overlays exported from other flakes: + # neovim-nightly-overlay.overlays.default + + # Or define it inline, for example: + # (final: prev: { + # hi = final.hello.overrideAttrs (oldAttrs: { + # patches = [ ./change-hello-to-hi.patch ]; + # }); + # }) + ]; + # Configure your nixpkgs instance + config = { + # Disable if you don't want unfree packages + allowUnfree = true; + }; + }; + + # build home-manager with nixos-rebuild and not home-manager command + home-manager = { + extraSpecialArgs = { inherit inputs; }; + backupFileExtension = "backup"; + users = { + EXAMPLE = import ../../../home/EXAMPLE/EXAMPLE/${hostname}.nix; # FIXME + }; + }; + + environment.systemPackages = with pkgs; [ + ]; + + networking.hostName = hostname; + + # This setups a SSH server. Very important if you're setting up a headless system. + # Feel free to remove if you don't need it. + #Unused, keeping for later reference + services.openssh = { + enable = false; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + #system.stateVersion = "25.11"; #FIXME, should be fine to change on a fresh install +} diff --git a/hosts/common/features/Applications.nix b/hosts/Winter/common/features/Applications.nix similarity index 100% rename from hosts/common/features/Applications.nix rename to hosts/Winter/common/features/Applications.nix diff --git a/hosts/common/features/DesktopKDEPlasma.nix b/hosts/Winter/common/features/DesktopKDEPlasma.nix similarity index 100% rename from hosts/common/features/DesktopKDEPlasma.nix rename to hosts/Winter/common/features/DesktopKDEPlasma.nix diff --git a/hosts/common/features/DesktopNiri.nix b/hosts/Winter/common/features/DesktopNiri.nix similarity index 100% rename from hosts/common/features/DesktopNiri.nix rename to hosts/Winter/common/features/DesktopNiri.nix diff --git a/hosts/common/global/base.nix b/hosts/Winter/common/global/base.nix similarity index 100% rename from hosts/common/global/base.nix rename to hosts/Winter/common/global/base.nix diff --git a/hosts/common/features/servers/minecraft.nix b/hosts/Winter/common/servers/minecraft.nix similarity index 59% rename from hosts/common/features/servers/minecraft.nix rename to hosts/Winter/common/servers/minecraft.nix index 2929141..00d46a9 100644 --- a/hosts/common/features/servers/minecraft.nix +++ b/hosts/Winter/common/servers/minecraft.nix @@ -7,22 +7,12 @@ pkgs, ... }: { + imports = [ + ./users/minecraft.nix + ]; networking.firewall = { enable = true; allowedTCPPorts = [ 25565 25567 ]; allowedUDPPorts = [ 25565 25567]; }; - - environment.systemPackages = with pkgs; [ - pkgs.jdk21 - ]; - - users.users = { - minecraft = { - isNormalUser = true; - shell = pkgs.bashInteractive; - openssh.authorizedKeys.keys = [ - ]; - }; - }; } diff --git a/hosts/Winter/common/servers/users/minecraft.nix b/hosts/Winter/common/servers/users/minecraft.nix new file mode 100644 index 0000000..4ec5cac --- /dev/null +++ b/hosts/Winter/common/servers/users/minecraft.nix @@ -0,0 +1,26 @@ +{ + pkgs, + config, + lib, + ... +}: let + username = "minecraft"; #FIXME + ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; +in { + users.users.${username} = { + isNormalUser = true; + extraGroups = ifTheyExist [ + "minecraft" + ]; + + #packages = [pkgs.home-manager]; + }; + + + home-manager.users.${username} = import ../../../../../home/Winter/servers/${username}.nix; + + security.pam.services = { + swaylock = {}; + ${username}.enableGnomeKeyring = true; + }; +} diff --git a/hosts/common/users/Ekisha/default.nix b/hosts/Winter/common/users/Ekisha/default.nix similarity index 80% rename from hosts/common/users/Ekisha/default.nix rename to hosts/Winter/common/users/Ekisha/default.nix index 4cc8197..c098b7b 100644 --- a/hosts/common/users/Ekisha/default.nix +++ b/hosts/Winter/common/users/Ekisha/default.nix @@ -20,7 +20,7 @@ in { }; - home-manager.users.${username} = import ../../../../home/${username}/${config.networking.hostName}.nix; + home-manager.users.${username} = import ../../../../../home/Winter/${username}/${config.networking.hostName}.nix; security.pam.services = { swaylock = {}; diff --git a/hosts/common/users/Tester/default.nix b/hosts/Winter/common/users/Tester/default.nix similarity index 77% rename from hosts/common/users/Tester/default.nix rename to hosts/Winter/common/users/Tester/default.nix index 3ba0b13..6e0934e 100644 --- a/hosts/common/users/Tester/default.nix +++ b/hosts/Winter/common/users/Tester/default.nix @@ -16,7 +16,7 @@ in { }; - home-manager.users.${username} = import ../../../../home/${username}/${config.networking.hostName}.nix; + home-manager.users.${username} = import ../../../../../home/Winter/${username}/${config.networking.hostName}.nix; security.pam.services = { swaylock = {}; diff --git a/hosts/common/users/Winter/default.nix b/hosts/Winter/common/users/Winter/default.nix similarity index 84% rename from hosts/common/users/Winter/default.nix rename to hosts/Winter/common/users/Winter/default.nix index 2ef07af..730e865 100644 --- a/hosts/common/users/Winter/default.nix +++ b/hosts/Winter/common/users/Winter/default.nix @@ -31,7 +31,7 @@ in { }; - home-manager.users.${username} = import ../../../../home/${username}/${config.networking.hostName}.nix; + home-manager.users.${username} = import ../../../../../home/Winter/${username}/${config.networking.hostName}.nix; security.pam.services = { swaylock = {}; diff --git a/hosts/Winter/common/users/example.nix b/hosts/Winter/common/users/example.nix new file mode 100644 index 0000000..d9f0753 --- /dev/null +++ b/hosts/Winter/common/users/example.nix @@ -0,0 +1,40 @@ +{ + pkgs, + config, + lib, + ... +}: let + username = ""; #FIXME + ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; +in { + users.users.${username} = { + isNormalUser = true; + extraGroups = ifTheyExist [ + "audio" + "deluge" + "docker" + "git" + "i2c" + "libvirtd" + "minecraft" + "mysql" + "wpa_supplicant" + "plugdev" + "podman" + "tss" + "video" + "wheel" + "wireshark" + ]; + + #packages = [pkgs.home-manager]; + }; + + + home-manager.users.${username} = import ../../../../../home/Winter/${username}/${config.networking.hostName}.nix; + + security.pam.services = { + swaylock = {}; + ${username}.enableGnomeKeyring = true; #FIXME + }; +}