From f63f0f897a63c9759f92f2779bc4c00700cffbcd Mon Sep 17 00:00:00 2001 From: th3r00t Date: Thu, 21 Aug 2025 11:09:41 -0400 Subject: [PATCH 1/4] Added server partitoning layout --- flake.lock | 41 ++++++++++++++++++++++++++++++++++++++--- server-partitioning.nix | 2 +- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 91909fd..d807743 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "disko": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1755519972, + "narHash": "sha256-bU4nqi3IpsUZJeyS8Jk85ytlX61i4b0KCxXX9YcOgVc=", + "owner": "nix-community", + "repo": "disko", + "rev": "4073ff2f481f9ef3501678ff479ed81402caae6d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -169,7 +187,7 @@ "git-hooks": "git-hooks", "hercules-ci-effects": "hercules-ci-effects", "neovim-src": "neovim-src", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -223,6 +241,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1752596105, + "narHash": "sha256-lFNVsu/mHLq3q11MuGkMhUUoSXEdQjCHvpReaGP1S2k=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "dab3a6e781554f965bde3def0aa2fda4eb8f1708", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1755113249, "narHash": "sha256-/bIVS2iP5mixEQWsaiiJ7EGLtk5Id9OehWbmTbzN6kE=", @@ -238,7 +272,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1755078291, "narHash": "sha256-Hu/gTDoi4uy6TAKISPHQusSMy8U6xUbLSDjKBYdhDIY=", @@ -256,10 +290,11 @@ }, "root": { "inputs": { + "disko": "disko", "home-manager": "home-manager", "neovim-nightly-overlay": "neovim-nightly-overlay", "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "sops-nix": "sops-nix" } }, diff --git a/server-partitioning.nix b/server-partitioning.nix index 43e371b..3201814 100644 --- a/server-partitioning.nix +++ b/server-partitioning.nix @@ -3,7 +3,7 @@ disk = { main = { type = "disk"; - device = "/dev/disk/by-diskseq/1"; + device = "/dev/sda"; content = { type = "gpt"; partitions = { From be99293472296251d1c234a44c72dbedb06bc946 Mon Sep 17 00:00:00 2001 From: th3r00t Date: Thu, 21 Aug 2025 11:34:23 -0400 Subject: [PATCH 2/4] Added configuration-common.nix --- configuration-server.nix | 3 +- configuration.nix | 28 ++---------------- modules/configuration-common.nix | 51 ++++++++++++++++++++++++++++++++ modules/home-manager-common.nix | 22 ++++++++++++++ 4 files changed, 77 insertions(+), 27 deletions(-) create mode 100644 modules/configuration-common.nix diff --git a/configuration-server.nix b/configuration-server.nix index e7b6d16..92062e1 100644 --- a/configuration-server.nix +++ b/configuration-server.nix @@ -9,8 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix ./server-partitioning.nix - ./modules/shares.nix - ./modules/sops.nix + ./modules/configuration-common.nix ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Bootloader. diff --git a/configuration.nix b/configuration.nix index 4661a67..67ce002 100644 --- a/configuration.nix +++ b/configuration.nix @@ -8,11 +8,11 @@ imports = [ # Include the results of the hardware scan. ./xps13-hardware-configuration.nix - ./modules/shares.nix - ./modules/sops.nix + ./modules/configuration-common.nix + # ./modules/shares.nix + # ./modules/sops.nix ./modules/laptop.nix ]; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Bootloader. boot = { kernelPackages = pkgs.linuxPackages_latest; @@ -31,22 +31,6 @@ ''; }; # Set your time zone. - time.timeZone = "America/New_York"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; # Enable the X11 windowing system. # You can disable this if you're only using the Wayland session. @@ -122,11 +106,9 @@ programs.firefox.enable = true; programs.hyprland.enable = true; - nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search, run: # $ nix search wget - environment.variables.EDITOR = "nvim"; environment.systemPackages = with pkgs; [ # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. # wget @@ -139,10 +121,6 @@ # Some programs need SUID wrappers, can be configured further or are # started in user sessions. programs.mtr.enable = true; - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; # List services that you want to enable: diff --git a/modules/configuration-common.nix b/modules/configuration-common.nix new file mode 100644 index 0000000..a2067ba --- /dev/null +++ b/modules/configuration-common.nix @@ -0,0 +1,51 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./shares.nix + ./sops.nix; + ]; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + time.timeZone = "America/New_York"; + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + nixpkgs.config.allowUnfree = true; + environment.variables.EDITOR = "nvim"; + + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + networking = { + hosts = { + "10.0.0.76" = [ "nas nas.lan" ]; + "10.0.0.125" = [ "git" "git.lan" ]; + "10.0.0.153" = [ "samphone" "samphone.lan" ]; + "10.0.0.223" = [ "pve", "pve.lan" ]; + "10.0.0.39" = [ "chronos" "chronos.lan" ]; + "10.0.0.78" = [ "pyshelf" "pyshelf.lan" ]; + "10.0.0.121" = [ "titan" "titan.lan" ]; + "10.0.0.107" = [ "psql" "psql.lan" ]; + "10.0.0.99" = [ "jelly" "jelly.lan" ]; + "10.0.0.207" = [ "sync" "sync.lan" ]; + "10.0.0.14" = [ "radios" "radios.lan" ]; + "10.0.0.172" = [ "vault" "vault.lan" ]; + "10.0.0.109" = [ "adguard" "adguard.lan" ]; + "10.0.0.50" = [ "dashy" "dashy.lan" ]; + }; + }; +} diff --git a/modules/home-manager-common.nix b/modules/home-manager-common.nix index f0e61b9..1bdf2b4 100644 --- a/modules/home-manager-common.nix +++ b/modules/home-manager-common.nix @@ -177,6 +177,28 @@ bind F3 send-keys 'igrep .' C-m enableBashIntegration = true; enableZshIntegration = true; }; + programs.ssh = { + enable = true; + extraConfig = '' + Host * + ServerAliveInterval 30 + ServerAliveCountMax 3 + AddKeysToAgent yes + ''; + matchBlocks = { + samphone = { + host = "10.0.0.153"; + user = "u0_a771"; + port = 8022; + identityFile = "~/.ssh/id_ed25519"; + }; + git.local = { + host = "10.0.0.125"; + user = "git"; + identityFile = "~/.ssh/id_ed25519"; + }; + }; + }; programs.starship = { enable = true; # custom settings From 14bdf543be4b1a564027debc1c23415f25c3acb7 Mon Sep 17 00:00:00 2001 From: th3r00t Date: Thu, 21 Aug 2025 12:45:26 -0400 Subject: [PATCH 3/4] Fixed --- flake.nix | 3 ++- modules/configuration-common.nix | 4 ++-- modules/home-manager-common.nix | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 33ba709..6151903 100644 --- a/flake.nix +++ b/flake.nix @@ -35,7 +35,8 @@ modules = [ { nixpkgs.overlays = overlays; } sops-nix.nixosModules.sops - ./xps13-hardware-configuration.nix.nix + ./configuration.nix + ./xps13-hardware-configuration.nix home-manager.nixosModules.home-manager { # home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; diff --git a/modules/configuration-common.nix b/modules/configuration-common.nix index a2067ba..66574b9 100644 --- a/modules/configuration-common.nix +++ b/modules/configuration-common.nix @@ -4,7 +4,7 @@ imports = [ ./shares.nix - ./sops.nix; + ./sops.nix ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -35,7 +35,7 @@ "10.0.0.76" = [ "nas nas.lan" ]; "10.0.0.125" = [ "git" "git.lan" ]; "10.0.0.153" = [ "samphone" "samphone.lan" ]; - "10.0.0.223" = [ "pve", "pve.lan" ]; + "10.0.0.223" = [ "pve" "pve.lan" ]; "10.0.0.39" = [ "chronos" "chronos.lan" ]; "10.0.0.78" = [ "pyshelf" "pyshelf.lan" ]; "10.0.0.121" = [ "titan" "titan.lan" ]; diff --git a/modules/home-manager-common.nix b/modules/home-manager-common.nix index 1bdf2b4..c1c8b55 100644 --- a/modules/home-manager-common.nix +++ b/modules/home-manager-common.nix @@ -192,7 +192,7 @@ bind F3 send-keys 'igrep .' C-m port = 8022; identityFile = "~/.ssh/id_ed25519"; }; - git.local = { + git = { host = "10.0.0.125"; user = "git"; identityFile = "~/.ssh/id_ed25519"; From 9ac155a7e298958de5acb24d75adbb339bdcfba8 Mon Sep 17 00:00:00 2001 From: th3r00t Date: Fri, 22 Aug 2025 22:20:49 -0400 Subject: [PATCH 4/4] Added udisks and nemo --- configuration.nix | 1 + home-xps13.nix | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/configuration.nix b/configuration.nix index 67ce002..73ac931 100644 --- a/configuration.nix +++ b/configuration.nix @@ -30,6 +30,7 @@ options ath10k_core rawmode=1 ''; }; + services.udisks2.enable = true; # Set your time zone. # Enable the X11 windowing system. diff --git a/home-xps13.nix b/home-xps13.nix index 001a558..58f4868 100644 --- a/home-xps13.nix +++ b/home-xps13.nix @@ -132,7 +132,16 @@ power-profiles-daemon wpa_supplicant_gui gvfs + nemo-with-extensions ]; + services.udiskie = { + enable = true; + settings = { + program_options = { + file_manager = "${pkgs.nemo-with-extensions}/bin/nemo"; + }; + }; + }; programs.wofi = { enable = true; settings = {