diff --git a/.gitattributes b/.gitattributes
index 8aafc71..c028012 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1 @@
-extras/secrets.nix filter=git-crypt diff=git-crypt
+variables/secrets/** filter=git-crypt diff=git-crypt
diff --git a/extras/overlays.nix b/extras/overlays.nix
deleted file mode 100644
index a278a90..0000000
--- a/extras/overlays.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{ inputs, ... }: {
- additions = final: _prev: import ./pkgs {pkgs = final;};
-
- selfsuper = (self: super: {
- mpv = super.mpv.override {
- scripts = with self.mpvScripts; [mpris sponsorblock thumbnail];
- };
- });
-
- finalprev = (final: prev: {
- unstable = import inputs.nixpkgs-unstable {
- system = final.system;
- config.allowUnfree = true;
- };
- });
-}
diff --git a/extras/pkgs/default.nix b/extras/pkgs/default.nix
deleted file mode 100644
index 4bff294..0000000
--- a/extras/pkgs/default.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{ pkgs, ... }: {
- xash3d = pkgs.callPackage ./xash/xash3d.nix {};
- hlsdk = pkgs.callPackage ./xash/hlsdk.nix {};
-}
diff --git a/extras/secrets-template.nix b/extras/secrets-template.nix
deleted file mode 100644
index 743d577..0000000
--- a/extras/secrets-template.nix
+++ /dev/null
@@ -1,72 +0,0 @@
-{ ... }: {
- # Define domains
- jimDomain = "";
-
- # User account passwords, generated with 'mkpasswd -m sha-512'
- jimboAccPass = "";
-
- # External emails
- jimUsername = "";
- jimEmail = "";
-
- # SSH Keys
- jimKeys = [
- ""
- ""
- ];
-
- # System timezone in standard timezone identifier format
- timeZone = "";
-
- # Cloudflare API key
- flareApiKey = "";
-
- # Wireguard keys, generated with the wg command
- wgServerPriv = "";
- wgServerPub = "";
- wgClientPriv = "";
- wgClientPub = "";
- wgPixel9Pub = "";
- wgOraclePub = "";
-
- # Icecast, plaintext
- castAdminPass = "";
- castSourcePass = "";
-
- # Photoprism, plaintext
- prismAdminPass = "";
-
- # Matrix secrets
- matrixSecret = "";
- discordBotID = "";
- discordBotToken = "";
-
- # Pixelfed secret, must be 32 characters long
- pixelfedKey = ''
- APP_KEY=
- '';
-
- # Transmission credentials, plaintext
- transmissionCredFile = ''
- {
- "rpc-username": "",
- "rpc-password": ""
- }
- '';
-
- # Email cleartext passwords
- noreplyPassword = "";
-
- # Email account hashes, generated with 'mkpasswd -m bcrypt'
- noreplyMailHash = "";
- jimboMailHash = "";
- lunaMailHash = "";
- freecornMailHash = "";
- tinyMailHash = "";
-
- # IPs
- jimIP1 = "";
- jimIP2 = "";
- lunaIP = "";
- cornIP = "";
-}
diff --git a/extras/secrets.nix b/extras/secrets.nix
deleted file mode 100644
index 0bbdb5c..0000000
Binary files a/extras/secrets.nix and /dev/null differ
diff --git a/flake.lock b/flake.lock
index 5081499..98ba869 100644
--- a/flake.lock
+++ b/flake.lock
@@ -33,6 +33,27 @@
"type": "gitlab"
}
},
+ "crane": {
+ "inputs": {
+ "nixpkgs": [
+ "lanzaboote",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1717535930,
+ "narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=",
+ "owner": "ipetkov",
+ "repo": "crane",
+ "rev": "55e7754ec31dac78980c8be45f8a28e80e370946",
+ "type": "github"
+ },
+ "original": {
+ "owner": "ipetkov",
+ "repo": "crane",
+ "type": "github"
+ }
+ },
"flake-compat": {
"flake": false,
"locked": {
@@ -50,6 +71,22 @@
}
},
"flake-compat_2": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1696426674,
+ "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@@ -65,9 +102,48 @@
"type": "github"
}
},
+ "flake-parts": {
+ "inputs": {
+ "nixpkgs-lib": [
+ "lanzaboote",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1717285511,
+ "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
"flake-utils": {
"inputs": {
- "systems": "systems_2"
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1710146030,
+ "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_2": {
+ "inputs": {
+ "systems": "systems_3"
},
"locked": {
"lastModified": 1681202837,
@@ -83,6 +159,28 @@
"type": "github"
}
},
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "lanzaboote",
+ "pre-commit-hooks-nix",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1709087332,
+ "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
"hardware": {
"locked": {
"lastModified": 1727665282,
@@ -120,10 +218,37 @@
"type": "github"
}
},
+ "lanzaboote": {
+ "inputs": {
+ "crane": "crane",
+ "flake-compat": "flake-compat",
+ "flake-parts": "flake-parts",
+ "flake-utils": "flake-utils",
+ "nixpkgs": [
+ "nixpkgs"
+ ],
+ "pre-commit-hooks-nix": "pre-commit-hooks-nix",
+ "rust-overlay": "rust-overlay"
+ },
+ "locked": {
+ "lastModified": 1718178907,
+ "narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=",
+ "owner": "nix-community",
+ "repo": "lanzaboote",
+ "rev": "b627ccd97d0159214cee5c7db1412b75e4be6086",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "ref": "v0.4.1",
+ "repo": "lanzaboote",
+ "type": "github"
+ }
+ },
"mailserver": {
"inputs": {
"blobs": "blobs",
- "flake-compat": "flake-compat",
+ "flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_2",
"nixpkgs-24_05": "nixpkgs-24_05",
"utils": "utils"
@@ -145,8 +270,8 @@
},
"minecraft": {
"inputs": {
- "flake-compat": "flake-compat_2",
- "flake-utils": "flake-utils",
+ "flake-compat": "flake-compat_3",
+ "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
@@ -192,6 +317,22 @@
"type": "indirect"
}
},
+ "nixpkgs-stable": {
+ "locked": {
+ "lastModified": 1710695816,
+ "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "614b4613980a522ba49f0d194531beddbb7220d3",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-23.11",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1727348695,
@@ -270,11 +411,39 @@
"type": "github"
}
},
+ "pre-commit-hooks-nix": {
+ "inputs": {
+ "flake-compat": [
+ "lanzaboote",
+ "flake-compat"
+ ],
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "lanzaboote",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable"
+ },
+ "locked": {
+ "lastModified": 1717664902,
+ "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
"blender-bin": "blender-bin",
"hardware": "hardware",
"home-manager": "home-manager",
+ "lanzaboote": "lanzaboote",
"mailserver": "mailserver",
"minecraft": "minecraft",
"nixpkgs": "nixpkgs_4",
@@ -282,6 +451,31 @@
"nur": "nur"
}
},
+ "rust-overlay": {
+ "inputs": {
+ "flake-utils": [
+ "lanzaboote",
+ "flake-utils"
+ ],
+ "nixpkgs": [
+ "lanzaboote",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1717813066,
+ "narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=",
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465",
+ "type": "github"
+ },
+ "original": {
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "type": "github"
+ }
+ },
"systems": {
"locked": {
"lastModified": 1681028828,
@@ -312,9 +506,24 @@
"type": "github"
}
},
+ "systems_3": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
"utils": {
"inputs": {
- "systems": "systems"
+ "systems": "systems_2"
},
"locked": {
"lastModified": 1709126324,
diff --git a/flake.nix b/flake.nix
index 3a05b01..e36e1a1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,16 +1,20 @@
{
- description = "Jimbo's systems as a flake";
-
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
- nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
+ unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.8.tar.gz";
minecraft.url = "github:Infinidoge/nix-minecraft";
hardware.url = "github:nixos/nixos-hardware/master";
+ # Secure boot
+ lanzaboote = {
+ url = "github:nix-community/lanzaboote/v0.4.1";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
# Home manager
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
@@ -21,11 +25,12 @@
outputs = {
self,
nixpkgs,
- nixpkgs-unstable,
+ unstable,
nur,
mailserver,
blender-bin,
hardware,
+ lanzaboote,
home-manager,
...
} @inputs: let
@@ -35,12 +40,16 @@
"x86_64-linux"
];
in rec {
- # Your custom packages
- # Accessible through 'nix build', 'nix shell', etc
- packages = forAllSystems (system: import ./extras/pkgs nixpkgs.legacyPackages.${system});
+ channels = {
+ master = import nixpkgs {
+ inherit (flake) system overlays;
+ config.allowUnfree = true;
+ };
+ unstable = import unstable { inherit (flake) system; };
+ nur = import nur { nurpkgs = import nixpkgs { inherit (flake) system; }; };
+ };
- # Your custom packages and modifications, exported as overlays
- overlays = import ./extras/overlays.nix {inherit inputs;};
+ packages = import ./packages/default.nix { inherit (nix) pkgs; };
# Variables defined so they can be accessed globally
secrets = import ./extras/secrets.nix;
@@ -55,27 +64,28 @@
JimDesktop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
- ./hosts/JimDesktop/configuration.nix
+ ./system/hosts/JimDesktop/configuration.nix
+ lanzaboote.nixosModules.lanzaboote
];
};
JimServer = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
- ./JimServer/configuration.nix
+ ./system/hosts/JimServer/configuration.nix
mailserver.nixosModule
];
};
JimPine = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
- ./hosts/JimPine/configuration.nix
+ ./system/hosts/JimPine/configuration.nix
hardware.nixosModules.pine64-pinebook-pro
];
};
JimLenovo = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [
- ./hosts/JimLenovo/configuration.nix
+ ./system/hosts/JimLenovo/configuration.nix
];
};
};
@@ -86,7 +96,7 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
- ./hosts/JimDesktop/home.nix
+ ./home/hosts/JimDesktop/home.nix
nur.nixosModules.nur
];
};
@@ -94,14 +104,14 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
- ./hosts/JimServer/home.nix
+ ./home/hosts/JimServer/home.nix
];
};
"jimbo@JimPine" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.aarch64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
- ./hosts/JimPine/home.nix
+ ./home/hosts/JimPine/home.nix
nur.nixosModules.nur
];
};
@@ -109,7 +119,7 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
- ./hosts/JimLenovo/home.nix
+ ./home/hosts/JimLenovo/home.nix
nur.nixosModules.nur
];
};
@@ -118,7 +128,7 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = {inherit inputs outputs;};
modules = [
- ./hosts/JimTerminal/home.nix
+ ./home/hosts/JimTerminal/home.nix
];
};
};
diff --git a/home/modules/default.nix b/home/modules/default.nix
deleted file mode 100644
index a375307..0000000
--- a/home/modules/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ ... }: {
- imports = [
- ./files
- ./settings
- ];
-}
diff --git a/home/modules/overlays/default.nix b/home/modules/overlays/default.nix
deleted file mode 100644
index d4212c6..0000000
--- a/home/modules/overlays/default.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ ... }: {
- nixpkgs.overlays = [
- outputs.overlays.additions
- outputs.overlays.selfsuper
- outputs.overlays.finalprev
- inputs.blender-bin.overlays.default
- ];
-}
diff --git a/home/pc.nix b/home/pc.nix
deleted file mode 100644
index 3ab8ead..0000000
--- a/home/pc.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ ... }: {
- imports = [
- ./default.nix
- ./modules
- ./profiles
- ./programs
- ./sway
- ./utils
- ];
-}
diff --git a/home/programs/gaming/emulators/default.nix b/home/programs/gaming/emulators/default.nix
deleted file mode 100644
index 8a8024c..0000000
--- a/home/programs/gaming/emulators/default.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{pkgs, lib, config, ...}: {
- options = {
- gaming.emulators.enable = lib.mkEnableOption "Enable console emulators";
- };
-
- config = mkIf config.gaming.emulators.enable; {
- home.packages = with pkgs; [
- dolphin-emu
- cemu
- ryujinx
- duckstation
- pcsx2
- unstable.lime3ds
- ];
- };
-}
diff --git a/home/programs/gaming/general/default.nix b/home/programs/gaming/general/default.nix
deleted file mode 100644
index 1a1699f..0000000
--- a/home/programs/gaming/general/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{pkgs, lib, config, ...}: {
- options = {
- gaming.general.enable = lib.mkEnableOption "Enable PC gaming apps";
- };
-
- config = mkIf config.gaming.general.enable; {
- home.packages = with pkgs; [
- steam
- steam-run
- heroic
- prismlauncher
- ];
- };
-}
diff --git a/home/programs/gaming/xash3d/default.nix b/home/programs/gaming/xash3d/default.nix
deleted file mode 100644
index d232a9b..0000000
--- a/home/programs/gaming/xash3d/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{pkgs, lib, config, ...}: {
- options = {
- gaming.xash3d.enable = lib.mkEnableOption "Enable Xash3d for Half-Life";
- };
-
- config = mkIf config.gaming.xash3d.enable; {
- home.packages = with pkgs; [
- xash3d
- hlsdk
- ];
- };
-}
diff --git a/home/programs/misc/avtools/default.nix b/home/programs/misc/avtools/default.nix
deleted file mode 100644
index ac41595..0000000
--- a/home/programs/misc/avtools/default.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- misc.avtools.enable = lib.mkEnableOption "Enable audio video tools";
- };
-
- imports = mkIf config.misc.avtools.enable [
- ./obs
- ];
-
- config = mkIf config.misc.avtools.enable; {
- home.packages = with pkgs; [
- yt-dlp
- spotdl
- playerctl
- ffmpeg
- pulsemixer
- ];
- };
-}
diff --git a/home/programs/misc/chat/default.nix b/home/programs/misc/chat/default.nix
deleted file mode 100644
index a429194..0000000
--- a/home/programs/misc/chat/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- misc.chat.enable = lib.mkEnableOption "Enable chat clients";
- };
-
- config = mkIf config.misc.chat.enable; {
- home.packages = with pkgs; [
- vesktop
- fractal
- ];
- };
-}
diff --git a/home/programs/misc/general/default.nix b/home/programs/misc/general/default.nix
deleted file mode 100644
index f5e89d1..0000000
--- a/home/programs/misc/general/default.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- misc.general.enable = lib.mkEnableOption "Enable general use apps";
- };
-
- config = mkIf config.misc.general.enable; {
- home.packages = with pkgs; [
- imv
- qbittorrent
- libreoffice-fresh
- ffmpegthumbnailer
- thunderbird
- protonvpn-cli_2
- bc
- ];
- };
-}
diff --git a/home/programs/misc/headless/default.nix b/home/programs/misc/headless/default.nix
deleted file mode 100644
index 1df8a2c..0000000
--- a/home/programs/misc/headless/default.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- misc.headless.enable = lib.mkEnableOption "Enable apps that can be used headlessly";
- };
-
- config = mkIf config.misc.headless.enable; {
- home.packages = with pkgs; [
- home-manager
- gotop
- tcptrack
- p7zip
- vimv
- dua
- pciutils
- usbutils
- protonvpn-cli_2
- ];
- };
-}
diff --git a/home/programs/misc/production/default.nix b/home/programs/misc/production/default.nix
deleted file mode 100644
index 6f9610e..0000000
--- a/home/programs/misc/production/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- production.enable = lib.mkEnableOption "Enable apps used for production";
- };
-
- config = mkIf config.misc.production.enable; {
- home.packages = with pkgs; [
- krita
- inkscape
- audacity
- blender_4_2
- sunvox
- ];
- };
-}
diff --git a/home/programs/misc/remote-desktop/default.nix b/home/programs/misc/remote-desktop/default.nix
deleted file mode 100644
index 3c6c253..0000000
--- a/home/programs/misc/remote-desktop/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- remote-desktop.enable = lib.mkEnableOption "Enable remote desktop related apps";
- };
-
- config = mkIf misc.remote-desktop.nvidia.enable; {
- home.packages = with pkgs; [
- moonlight-qt
- rustdesk-flutter
- ];
- };
-}
diff --git a/home/programs/misc/school/default.nix b/home/programs/misc/school/default.nix
deleted file mode 100644
index 7f21bd8..0000000
--- a/home/programs/misc/school/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ pkgs, lib, config, ... }: {
- options = {
- school.enable = lib.mkEnableOption "Enable apps needed for school";
- };
-
- config = mkIf config.misc.school.enable; {
- home.packages = with pkgs; [
- remmina
- freerdp
- globalprotect-openconnect
- zoom-us
- ];
- };
-}
diff --git a/home/server.nix b/home/server.nix
deleted file mode 100644
index a39efb2..0000000
--- a/home/server.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ ... }: {
- imports = [
- ./default.nix
- ./utils/zsh
- ./utils/git
- ./programs/fastfetch
- ./programs/neovim
- ./programs/ranger
- ./programs/tmux
- ];
-}
diff --git a/hosts/JimDesktop/configuration.nix b/hosts/JimDesktop/configuration.nix
deleted file mode 100644
index adeba1a..0000000
--- a/hosts/JimDesktop/configuration.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- imports = [
- # Base configs
- ./../../system
- ./../../system/pc.nix
-
- # Hardware
- ./hardware-configuration.nix
- ./../../system/modules/boot/systemd
- ];
-
- # Enable Nvidia drivers
- drivers.nvidia.enable = true;
-
- # Set hostname
- networking.hostName = "JimDesktop";
-
- # Force Electron to use Wayland
- environment.sessionVariables.NIXOS_OZONE_WL = "1";
-
- # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
- system.stateVersion = "24.05";
-}
diff --git a/hosts/JimDesktop/home.nix b/hosts/JimDesktop/home.nix
deleted file mode 100644
index f37661a..0000000
--- a/hosts/JimDesktop/home.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{config, ...}: {
- imports = [
- # Common modules
- ./../../home
- ./../../home/pc.nix
- ];
-
- # Useful
- general.enable = true;
- chat.enable = true;
- avtools.enable = true;
- production.enable = true;
- obs.enable = true;
- remotedesktop.enable = false;
- school.enable = true;
-
- # Gaming
- pcgaming.enable = true;
- emulators.enable = false;
- xash3d.enable = true;
-
- # Symlinks
- home.file = {
- "VMs".source = config.lib.file.mkOutOfStoreSymlink "/etc/libvirt/VMs";
- };
-}
diff --git a/hosts/JimLenovo/configuration.nix b/hosts/JimLenovo/configuration.nix
deleted file mode 100644
index a543934..0000000
--- a/hosts/JimLenovo/configuration.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- imports = [
- # Base configs
- ./../../base.nix
-
- # Import users and groups
- ./../../users/jimbo.nix
- ./../../users/groups.nix
-
- # Desktop
- ./../../desktop/misc.nix
- ./../../desktop/sway.nix
- ./../../desktop/greetd-sway.nix
- ./../../desktop/printing.nix
- ./../../desktop/gaming.nix
- ./../../desktop/pipewire.nix
- ./../../desktop/bluetooth.nix
- ./../../desktop/firewall.nix
- ./../../desktop/fonts.nix
- ./../../desktop/qt.nix
-
- # Laptop/Portable only
- ./../../modules/wireless.nix
-
- # Modules
- ./../../modules/security.nix
-
- # Hardware
- ./hardware-configuration.nix
- ./../../modules/systemdboot.nix
- ./../../modules/opengl.nix
-
- # Services
- ./../../services/openssh.nix
- ./../../services/gnome-keyring.nix
- ./../../services/udev.nix
- ./../../services/mpd.nix
- ];
-
- # Set hostname
- networking.hostName = "JimLenovo";
-
- # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
- system.stateVersion = "24.05";
-}
diff --git a/hosts/JimLenovo/hardware-configuration.nix b/hosts/JimLenovo/hardware-configuration.nix
deleted file mode 100644
index be3a8b4..0000000
--- a/hosts/JimLenovo/hardware-configuration.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-{ config, lib, pkgs, modulesPath, ... }: {
- imports = [
- (modulesPath + "/installer/scan/not-detected.nix")
- ];
-
- # Set all boot options
- boot = {
- # Set a kernel version and load/blacklist drivers
- kernelPackages = pkgs.linuxPackages_zen;
- blacklistedKernelModules = [
- "pcspkr"
- ];
- kernel.sysctl."vm.max_map_count" = 2147483642;
- initrd = {
- availableKernelModules = [
- "nvme"
- "xhci_pci"
- "usbhid"
- "usb_storage"
- "sd_mod"
- "sdhci_pci"
- ];
- kernelModules = [
- "kvm-amd"
- ];
- };
- };
-
- # Mount everything as necessary
- fileSystems = {
- "/" = {
- device = "/dev/disk/by-uuid/c0fe8419-88f9-48a0-8c5b-acd4c11f8037";
- fsType = "ext4";
- };
- "/boot" = {
- device = "/dev/disk/by-uuid/BF2B-9AE0";
- fsType = "vfat";
- options = [ "fmask=0022" "dmask=0022" ];
- };
- };
-
- # Enables DHCP on each ethernet and wireless interface.
- networking.useDHCP = lib.mkDefault true;
-
- nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
- hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
-}
diff --git a/hosts/JimLenovo/home.nix b/hosts/JimLenovo/home.nix
deleted file mode 100644
index 7c2f738..0000000
--- a/hosts/JimLenovo/home.nix
+++ /dev/null
@@ -1,17 +0,0 @@
-{config, ...}: {
- imports = [
- # Common modules
- ./../../home/base.nix
- ./../../home/pc.nix
- ./../../home/users/jimbo.nix
- ];
-
- # Useful
- general.enable = true;
- chat.enable = true;
- avtools.enable = true;
- remotedesktop.enable = true;
-
- # Gaming
- pcgaming.enable = true;
-}
diff --git a/hosts/JimPine/configuration.nix b/hosts/JimPine/configuration.nix
deleted file mode 100644
index 71bfa10..0000000
--- a/hosts/JimPine/configuration.nix
+++ /dev/null
@@ -1,49 +0,0 @@
-{lib, outputs, ...}: {
- imports = [
- # Base configs
- ./../../base.nix
-
- # Import users and groups
- ./../../users/jimbo.nix
- ./../../users/groups.nix
-
- # Desktop
- ./../../desktop/misc.nix
- ./../../desktop/sway.nix
- ./../../desktop/greetd-sway.nix
- ./../../desktop/printing.nix
- ./../../desktop/pipewire.nix
- ./../../desktop/bluetooth.nix
- ./../../desktop/firewall.nix
- ./../../desktop/fonts.nix
- ./../../desktop/qt.nix
- ./../../desktop/wireguard.nix
-
- # Modules
- ./../../modules/security.nix
-
- # Hardware
- ./hardware-configuration.nix
- ./../../modules/extlinux.nix
- ./../../modules/opengl.nix
- ./../../modules/filesystems.nix
- ./../../modules/wireless.nix
-
- # Services
- ./../../services/openssh.nix
- ./../../services/gnome-keyring.nix
- ./../../services/mpd.nix
- ];
-
- # Set hostname
- networking.hostName = "JimPine";
-
- # Disable 32 bit graphics
- hardware.opengl.driSupport32Bit = lib.mkForce false;
-
- # Set the VPN IP per machine
- networking.wireguard.interfaces."${outputs.ips.wgInt}".ips = [ "${outputs.ips.wgSpan}.17/32" ];
-
- # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
- system.stateVersion = "24.05";
-}
diff --git a/hosts/JimPine/home.nix b/hosts/JimPine/home.nix
deleted file mode 100644
index bc49b50..0000000
--- a/hosts/JimPine/home.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{config, ...}: {
- imports = [
- # Common modules
- ./../../home/base.nix
- ./../../home/pc.nix
- ./../../home/users/jimbo.nix
- ];
-
- # Useful
- general.enable = true;
- chat.enable = true;
- avtools.enable = true;
- remotedesktop.enable = true;
-
- # Needed to make the speaker work
- home.packages = with pkgs; [
- alsa-utils
- ];
-
- wayland.windowManager.sway.config.output.${outputs.displays.dI}.scale = "1.3";
-}
diff --git a/hosts/JimServer/configuration.nix b/hosts/JimServer/configuration.nix
deleted file mode 100644
index 7452d0e..0000000
--- a/hosts/JimServer/configuration.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- imports = [
- # Base configs
- ./../../system
- ./../../system/profiles/server
-
- # Hardware
- ./hardware-configuration.nix
- ./../../system/modules/boot/systemd
- ];
-
- # Set custom openssh port
- services.openssh.ports = [ 2222 ];
-
- # Set hostname
- networking.hostName = "JimServer";
-
- # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
- system.stateVersion = "24.05";
-}
diff --git a/hosts/JimServer/home.nix b/hosts/JimServer/home.nix
deleted file mode 100644
index 02a60c7..0000000
--- a/hosts/JimServer/home.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- imports = [
- ./../../home
- ./../../home/server.nix
- ];
-}
diff --git a/hosts/JimTerminal/home.nix b/hosts/JimTerminal/home.nix
deleted file mode 100644
index d0d54ae..0000000
--- a/hosts/JimTerminal/home.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- imports = [
- # Common modules
- ./../../base.nix
- ./../../users/jimbo.nix
- ];
-
- # Rebuild this entire system
- programs.zsh = {
- shellAliases = {
- termswitch = "home-manager switch --flake ~/.home-manager/.#jimbo@JimTerminal --extra-experimental-features 'nix-command flakes'";
- };
- };
-}
diff --git a/home/default.nix b/modules/home/default.nix
similarity index 85%
rename from home/default.nix
rename to modules/home/default.nix
index d31929a..7ca9b09 100644
--- a/home/default.nix
+++ b/modules/home/default.nix
@@ -1,9 +1,9 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./users
];
- # Allow unfree
nixpkgs.config.allowUnfree = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
diff --git a/home/modules/files/assets/user-icon.png b/modules/home/files/assets/user-icon.png
similarity index 100%
rename from home/modules/files/assets/user-icon.png
rename to modules/home/files/assets/user-icon.png
diff --git a/home/modules/files/assets/wallpapers/1.png b/modules/home/files/assets/wallpapers/1.png
similarity index 100%
rename from home/modules/files/assets/wallpapers/1.png
rename to modules/home/files/assets/wallpapers/1.png
diff --git a/home/modules/files/assets/wallpapers/2.png b/modules/home/files/assets/wallpapers/2.png
similarity index 100%
rename from home/modules/files/assets/wallpapers/2.png
rename to modules/home/files/assets/wallpapers/2.png
diff --git a/home/modules/files/assets/wallpapers/3.png b/modules/home/files/assets/wallpapers/3.png
similarity index 100%
rename from home/modules/files/assets/wallpapers/3.png
rename to modules/home/files/assets/wallpapers/3.png
diff --git a/home/modules/files/assets/wallpapers/lock.png b/modules/home/files/assets/wallpapers/lock.png
similarity index 100%
rename from home/modules/files/assets/wallpapers/lock.png
rename to modules/home/files/assets/wallpapers/lock.png
diff --git a/home/modules/files/default.nix b/modules/home/files/default.nix
similarity index 100%
rename from home/modules/files/default.nix
rename to modules/home/files/default.nix
diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix
new file mode 100644
index 0000000..023aaf7
--- /dev/null
+++ b/modules/home/programs/default.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ imports = [
+ ./gui
+ ./terminal
+ ./misc
+ ];
+}
diff --git a/home/programs/default.nix b/modules/home/programs/gui/default.nix
similarity index 53%
rename from home/programs/default.nix
rename to modules/home/programs/gui/default.nix
index b927eb5..fefac51 100644
--- a/home/programs/default.nix
+++ b/modules/home/programs/gui/default.nix
@@ -1,20 +1,13 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./easyeffects
- ./fastfetch
./foot
- ./gaming
- ./git
./librewolf
./mako
./mangohud
- ./misc
./mpv
- ./ncmpcpp
- ./neovim
./pcmanfm-qt
- ./ranger
./rofi
- ./tmux
];
}
diff --git a/home/programs/easyeffects/JimHeadphones.json b/modules/home/programs/gui/easyeffects/JimHeadphones.json
similarity index 100%
rename from home/programs/easyeffects/JimHeadphones.json
rename to modules/home/programs/gui/easyeffects/JimHeadphones.json
diff --git a/home/programs/easyeffects/default.nix b/modules/home/programs/gui/easyeffects/default.nix
similarity index 91%
rename from home/programs/easyeffects/default.nix
rename to modules/home/programs/gui/easyeffects/default.nix
index 5af4571..817b42d 100644
--- a/home/programs/easyeffects/default.nix
+++ b/modules/home/programs/gui/easyeffects/default.nix
@@ -1,4 +1,5 @@
-{pkgs, ...}: {
+{ pkgs, ... }:
+{
home = {
packages = with pkgs; [
easyeffects
diff --git a/home/programs/foot/default.nix b/modules/home/programs/gui/foot/default.nix
similarity index 94%
rename from home/programs/foot/default.nix
rename to modules/home/programs/gui/foot/default.nix
index 73d8a1c..e18282c 100644
--- a/home/programs/foot/default.nix
+++ b/modules/home/programs/gui/foot/default.nix
@@ -1,5 +1,5 @@
-{outputs, ...}: {
- # Enable a terminal emulator
+{ outputs, ... }:
+{
programs.foot = {
enable = true;
server.enable = false;
diff --git a/home/programs/librewolf/default.nix b/modules/home/programs/gui/librewolf/default.nix
similarity index 99%
rename from home/programs/librewolf/default.nix
rename to modules/home/programs/gui/librewolf/default.nix
index 31b9ca1..1c31d46 100644
--- a/home/programs/librewolf/default.nix
+++ b/modules/home/programs/gui/librewolf/default.nix
@@ -1,4 +1,5 @@
-{pkgs, config, outputs, ...}: let
+{ pkgs, config, outputs, ... }:
+let
# FireFox colors
themeJim = ''
:root {
diff --git a/home/programs/mako/default.nix b/modules/home/programs/gui/mako/default.nix
similarity index 98%
rename from home/programs/mako/default.nix
rename to modules/home/programs/gui/mako/default.nix
index a320948..d10ecdc 100644
--- a/home/programs/mako/default.nix
+++ b/modules/home/programs/gui/mako/default.nix
@@ -1,4 +1,5 @@
-{pkgs, outputs, ...}: {
+{ pkgs, outputs, ... }:
+{
services.mako = {
enable = true;
borderColor = "#${outputs.look.colors.accent}";
diff --git a/home/programs/mangohud/default.nix b/modules/home/programs/gui/mangohud/default.nix
similarity index 93%
rename from home/programs/mangohud/default.nix
rename to modules/home/programs/gui/mangohud/default.nix
index c947388..4ce3b0d 100644
--- a/home/programs/mangohud/default.nix
+++ b/modules/home/programs/gui/mangohud/default.nix
@@ -1,10 +1,10 @@
-{pkgs, ...}: {
+{ pkgs, ... }:
+{
home = {
packages = with pkgs; [
mangohud
];
file = {
- # Mangohud config
".config/MangoHud/MangoHud.conf".text = ''
table_columns=2
frametime=0
diff --git a/home/programs/mpv/default.nix b/modules/home/programs/gui/mpv/default.nix
similarity index 93%
rename from home/programs/mpv/default.nix
rename to modules/home/programs/gui/mpv/default.nix
index f1f3e3d..1e9e4d4 100644
--- a/home/programs/mpv/default.nix
+++ b/modules/home/programs/gui/mpv/default.nix
@@ -1,3 +1,4 @@
+{ ... }:
{
programs.mpv = {
enable = true;
diff --git a/home/programs/pcmanfm-qt/default.nix b/modules/home/programs/gui/pcmanfm-qt/default.nix
similarity index 98%
rename from home/programs/pcmanfm-qt/default.nix
rename to modules/home/programs/gui/pcmanfm-qt/default.nix
index 0b71ace..ff6ee82 100644
--- a/home/programs/pcmanfm-qt/default.nix
+++ b/modules/home/programs/gui/pcmanfm-qt/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
home = {
packages = with pkgs; [
pcmanfm-qt
diff --git a/home/programs/rofi/default.nix b/modules/home/programs/gui/rofi/default.nix
similarity index 99%
rename from home/programs/rofi/default.nix
rename to modules/home/programs/gui/rofi/default.nix
index a66b213..58eb950 100644
--- a/home/programs/rofi/default.nix
+++ b/modules/home/programs/gui/rofi/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, config, outputs, ... }: {
+{ pkgs, config, outputs, ... }:
+{
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
diff --git a/modules/home/programs/misc/avtools/default.nix b/modules/home/programs/misc/avtools/default.nix
new file mode 100644
index 0000000..6ce15a2
--- /dev/null
+++ b/modules/home/programs/misc/avtools/default.nix
@@ -0,0 +1,14 @@
+{ pkgs, lib, config, ... }:
+{
+ imports = [
+ ./obs
+ ];
+
+ home.packages = with pkgs; [
+ yt-dlp
+ spotdl
+ playerctl
+ ffmpeg
+ pulsemixer
+ ];
+}
diff --git a/home/programs/misc/avtools/obs/obs.nix b/modules/home/programs/misc/avtools/obs/obs.nix
similarity index 89%
rename from home/programs/misc/avtools/obs/obs.nix
rename to modules/home/programs/misc/avtools/obs/obs.nix
index 536249b..5ee8c4c 100644
--- a/home/programs/misc/avtools/obs/obs.nix
+++ b/modules/home/programs/misc/avtools/obs/obs.nix
@@ -1,4 +1,5 @@
-{pkgs, lib, config, ...}: {
+{pkgs, lib, config, ...}:
+{
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
diff --git a/modules/home/programs/misc/chat/default.nix b/modules/home/programs/misc/chat/default.nix
new file mode 100644
index 0000000..aea297b
--- /dev/null
+++ b/modules/home/programs/misc/chat/default.nix
@@ -0,0 +1,7 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ vesktop
+ fractal
+ ];
+}
diff --git a/home/programs/misc/default.nix b/modules/home/programs/misc/default.nix
similarity index 76%
rename from home/programs/misc/default.nix
rename to modules/home/programs/misc/default.nix
index fe044fd..f8d36be 100644
--- a/home/programs/misc/default.nix
+++ b/modules/home/programs/misc/default.nix
@@ -1,11 +1,12 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./avtools
./chat
+ ./gaming/launchers
./general
./headless
./production
./remote-desktop
- ./school
];
}
diff --git a/home/programs/gaming/default.nix b/modules/home/programs/misc/gaming/default.nix
similarity index 67%
rename from home/programs/gaming/default.nix
rename to modules/home/programs/misc/gaming/default.nix
index d38017d..9e9eaae 100644
--- a/home/programs/gaming/default.nix
+++ b/modules/home/programs/misc/gaming/default.nix
@@ -1,6 +1,7 @@
+{ ... }:
{
imports = [
- ./general
+ ./launchers
./emulators
./xash3d
];
diff --git a/modules/home/programs/misc/gaming/emulators/default.nix b/modules/home/programs/misc/gaming/emulators/default.nix
new file mode 100644
index 0000000..ddbc44b
--- /dev/null
+++ b/modules/home/programs/misc/gaming/emulators/default.nix
@@ -0,0 +1,11 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ dolphin-emu
+ cemu
+ ryujinx
+ duckstation
+ pcsx2
+ unstable.lime3ds
+ ];
+}
diff --git a/modules/home/programs/misc/gaming/launchers/default.nix b/modules/home/programs/misc/gaming/launchers/default.nix
new file mode 100644
index 0000000..7fc5aa9
--- /dev/null
+++ b/modules/home/programs/misc/gaming/launchers/default.nix
@@ -0,0 +1,9 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ steam
+ steam-run
+ heroic
+ prismlauncher
+ ];
+}
diff --git a/modules/home/programs/misc/gaming/xash3d/default.nix b/modules/home/programs/misc/gaming/xash3d/default.nix
new file mode 100644
index 0000000..2158606
--- /dev/null
+++ b/modules/home/programs/misc/gaming/xash3d/default.nix
@@ -0,0 +1,6 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ xash3d
+ ];
+}
diff --git a/modules/home/programs/misc/general/default.nix b/modules/home/programs/misc/general/default.nix
new file mode 100644
index 0000000..4efce08
--- /dev/null
+++ b/modules/home/programs/misc/general/default.nix
@@ -0,0 +1,12 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ imv
+ qbittorrent
+ libreoffice-fresh
+ ffmpegthumbnailer
+ thunderbird
+ protonvpn-cli_2
+ bc
+ ];
+}
diff --git a/modules/home/programs/misc/headless/default.nix b/modules/home/programs/misc/headless/default.nix
new file mode 100644
index 0000000..1043532
--- /dev/null
+++ b/modules/home/programs/misc/headless/default.nix
@@ -0,0 +1,14 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ home-manager
+ gotop
+ tcptrack
+ p7zip
+ vimv
+ dua
+ pciutils
+ usbutils
+ protonvpn-cli_2
+ ];
+}
diff --git a/modules/home/programs/misc/production/default.nix b/modules/home/programs/misc/production/default.nix
new file mode 100644
index 0000000..654dd85
--- /dev/null
+++ b/modules/home/programs/misc/production/default.nix
@@ -0,0 +1,10 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ krita
+ inkscape
+ audacity
+ blender_4_2
+ sunvox
+ ];
+}
diff --git a/modules/home/programs/misc/remote-desktop/default.nix b/modules/home/programs/misc/remote-desktop/default.nix
new file mode 100644
index 0000000..d7e65b6
--- /dev/null
+++ b/modules/home/programs/misc/remote-desktop/default.nix
@@ -0,0 +1,7 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ moonlight-qt
+ rustdesk-flutter
+ ];
+}
diff --git a/modules/home/programs/misc/school/default.nix b/modules/home/programs/misc/school/default.nix
new file mode 100644
index 0000000..10320e6
--- /dev/null
+++ b/modules/home/programs/misc/school/default.nix
@@ -0,0 +1,9 @@
+{ pkgs, lib, config, ... }:
+{
+ home.packages = with pkgs; [
+ remmina
+ freerdp
+ zoom-us
+ globalprotect-openconnect
+ ];
+}
diff --git a/modules/home/programs/terminal/default.nix b/modules/home/programs/terminal/default.nix
new file mode 100644
index 0000000..4c16f71
--- /dev/null
+++ b/modules/home/programs/terminal/default.nix
@@ -0,0 +1,11 @@
+{ ... }:
+{
+ imports = [
+ ./fastfetch
+ ./git
+ ./ncmpcpp
+ ./neovim
+ ./ranger
+ ./tmux
+ ];
+}
diff --git a/home/programs/fastfetch/default.nix b/modules/home/programs/terminal/fastfetch/default.nix
similarity index 99%
rename from home/programs/fastfetch/default.nix
rename to modules/home/programs/terminal/fastfetch/default.nix
index 30f75c8..d5d5560 100644
--- a/home/programs/fastfetch/default.nix
+++ b/modules/home/programs/terminal/fastfetch/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
home = {
file = let
fastConf = ''
diff --git a/home/programs/git/git.nix b/modules/home/programs/terminal/git/git.nix
similarity index 85%
rename from home/programs/git/git.nix
rename to modules/home/programs/terminal/git/git.nix
index b8cad19..2714684 100644
--- a/home/programs/git/git.nix
+++ b/modules/home/programs/terminal/git/git.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
programs.git = {
enable = true;
lfs.enable = true;
diff --git a/home/programs/ncmpcpp/default.nix b/modules/home/programs/terminal/ncmpcpp/default.nix
similarity index 94%
rename from home/programs/ncmpcpp/default.nix
rename to modules/home/programs/terminal/ncmpcpp/default.nix
index c3e78fd..a4c1392 100644
--- a/home/programs/ncmpcpp/default.nix
+++ b/modules/home/programs/terminal/ncmpcpp/default.nix
@@ -1,4 +1,5 @@
-{pkgs, ...}: {
+{pkgs, ...}:
+{
programs.ncmpcpp = {
enable = true;
settings = {
diff --git a/home/programs/neovim/neovim.nix b/modules/home/programs/terminal/neovim/neovim.nix
similarity index 99%
rename from home/programs/neovim/neovim.nix
rename to modules/home/programs/terminal/neovim/neovim.nix
index e00cc5c..68d9d52 100644
--- a/home/programs/neovim/neovim.nix
+++ b/modules/home/programs/terminal/neovim/neovim.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
programs.neovim = {
enable = true;
defaultEditor = true;
diff --git a/home/programs/ranger/default.nix b/modules/home/programs/terminal/ranger/default.nix
similarity index 98%
rename from home/programs/ranger/default.nix
rename to modules/home/programs/terminal/ranger/default.nix
index 8c9f9d4..c4a4e30 100644
--- a/home/programs/ranger/default.nix
+++ b/modules/home/programs/terminal/ranger/default.nix
@@ -1,5 +1,5 @@
-{ pkgs, ... }: {
- # Enable Ranger
+{ pkgs, ... }:
+{
programs.ranger = {
enable = true;
settings = {
diff --git a/home/programs/tmux/default.nix b/modules/home/programs/terminal/tmux/default.nix
similarity index 96%
rename from home/programs/tmux/default.nix
rename to modules/home/programs/terminal/tmux/default.nix
index 9249fd4..471f6e2 100644
--- a/home/programs/tmux/default.nix
+++ b/modules/home/programs/terminal/tmux/default.nix
@@ -1,5 +1,5 @@
-{ ... }: {
- # Enable tmux
+{ ... }:
+{
programs.tmux = {
enable = true;
extraConfig = ''
diff --git a/home/modules/settings/dconf/default.nix b/modules/home/settings/dconf/default.nix
similarity index 95%
rename from home/modules/settings/dconf/default.nix
rename to modules/home/settings/dconf/default.nix
index e346e07..54ad39d 100644
--- a/home/modules/settings/dconf/default.nix
+++ b/modules/home/settings/dconf/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
dconf.settings = {
"org/gnome/desktop/interface/color-scheme" = {
color-scheme = "prefer-dark";
diff --git a/home/modules/settings/default.nix b/modules/home/settings/default.nix
similarity index 85%
rename from home/modules/settings/default.nix
rename to modules/home/settings/default.nix
index 71fc7e4..0b107fb 100644
--- a/home/modules/settings/default.nix
+++ b/modules/home/settings/default.nix
@@ -1,3 +1,4 @@
+{ ... }:
{
imports = [
./dconf
diff --git a/home/modules/settings/gtk/default.nix b/modules/home/settings/gtk/default.nix
similarity index 98%
rename from home/modules/settings/gtk/default.nix
rename to modules/home/settings/gtk/default.nix
index 3c8c612..781851f 100644
--- a/home/modules/settings/gtk/default.nix
+++ b/modules/home/settings/gtk/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
gtk = {
enable = true;
font = {
diff --git a/home/modules/settings/xdg/default.nix b/modules/home/settings/xdg/default.nix
similarity index 95%
rename from home/modules/settings/xdg/default.nix
rename to modules/home/settings/xdg/default.nix
index e86b521..b15b0df 100644
--- a/home/modules/settings/xdg/default.nix
+++ b/modules/home/settings/xdg/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
xdg.mimeApps.defaultApplications = {
"inode/directory" = ["pcmanfm-qt.desktop"];
"text/plain" = ["nvim.desktop"];
diff --git a/home/sway/autostart/default.nix b/modules/home/sway/autostart/default.nix
similarity index 98%
rename from home/sway/autostart/default.nix
rename to modules/home/sway/autostart/default.nix
index 8e45797..79cf26b 100644
--- a/home/sway/autostart/default.nix
+++ b/modules/home/sway/autostart/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
wayland.windowManager.sway = {
config = {
bars = [{command = "waybar";}];
diff --git a/home/sway/default.nix b/modules/home/sway/default.nix
similarity index 96%
rename from home/sway/default.nix
rename to modules/home/sway/default.nix
index d875d44..db8d1e0 100644
--- a/home/sway/default.nix
+++ b/modules/home/sway/default.nix
@@ -1,4 +1,5 @@
-{ config, pkgs, outputs, ... }: {
+{ config, pkgs, outputs, ... }:
+{
imports = [
./hardware
./theme
diff --git a/home/sway/hardware/default.nix b/modules/home/sway/hardware/default.nix
similarity index 97%
rename from home/sway/hardware/default.nix
rename to modules/home/sway/hardware/default.nix
index 9eea045..d625b4c 100644
--- a/home/sway/hardware/default.nix
+++ b/modules/home/sway/hardware/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
wayland.windowManager.sway = {
config = {
# Define monitors
diff --git a/home/sway/hotkeys/README.md b/modules/home/sway/hotkeys/README.md
similarity index 100%
rename from home/sway/hotkeys/README.md
rename to modules/home/sway/hotkeys/README.md
diff --git a/home/sway/hotkeys/default.nix b/modules/home/sway/hotkeys/default.nix
similarity index 99%
rename from home/sway/hotkeys/default.nix
rename to modules/home/sway/hotkeys/default.nix
index cce54d3..2f74699 100644
--- a/home/sway/hotkeys/default.nix
+++ b/modules/home/sway/hotkeys/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
wayland.windowManager.sway = {
config = let
# Set default modifier and variables
diff --git a/modules/home/sway/programs/default.nix b/modules/home/sway/programs/default.nix
new file mode 100644
index 0000000..9e0d6e6
--- /dev/null
+++ b/modules/home/sway/programs/default.nix
@@ -0,0 +1,14 @@
+{ pkgs, ... }:
+{
+ home.packages = with pkgs; [
+ wl-clipboard
+ wdisplays
+ clipman
+ libnotify
+ grim
+ slurp
+ swappy
+ jq
+ lm_sensors
+ ];
+}
diff --git a/home/sway/rules/default.nix b/modules/home/sway/rules/default.nix
similarity index 99%
rename from home/sway/rules/default.nix
rename to modules/home/sway/rules/default.nix
index 130d3d1..7aae9bd 100644
--- a/home/sway/rules/default.nix
+++ b/modules/home/sway/rules/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
wayland.windowManager.sway = {
config = {
# Assign workspaces to outputs
diff --git a/home/sway/swayfx/default.nix b/modules/home/sway/swayfx/default.nix
similarity index 83%
rename from home/sway/swayfx/default.nix
rename to modules/home/sway/swayfx/default.nix
index 82dd538..5d5fb20 100644
--- a/home/sway/swayfx/default.nix
+++ b/modules/home/sway/swayfx/default.nix
@@ -1,5 +1,5 @@
-{ pkgs, ... }: {
- # Enable Sway and write some scripts
+{ pkgs, ... }:
+{
wayland.windowManager.sway = {
package = pkgs.unstable.sway;
extraConfig = ''
diff --git a/home/sway/swaylock/default.nix b/modules/home/sway/swaylock/default.nix
similarity index 98%
rename from home/sway/swaylock/default.nix
rename to modules/home/sway/swaylock/default.nix
index c6e985e..4eb0cec 100644
--- a/home/sway/swaylock/default.nix
+++ b/modules/home/sway/swaylock/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: let
+{ pkgs, outputs, ... }:
+let
swayLock = pkgs.writeScriptBin "swaylock" ''
# Set the lock script
lockscript() {
diff --git a/home/sway/swayshot/default.nix b/modules/home/sway/swayshot/default.nix
similarity index 98%
rename from home/sway/swayshot/default.nix
rename to modules/home/sway/swayshot/default.nix
index f52eb29..5e762ec 100644
--- a/home/sway/swayshot/default.nix
+++ b/modules/home/sway/swayshot/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
imports = [
./swappy
];
diff --git a/home/sway/swayshot/swappy/default.nix b/modules/home/sway/swayshot/swappy/default.nix
similarity index 92%
rename from home/sway/swayshot/swappy/default.nix
rename to modules/home/sway/swayshot/swappy/default.nix
index e946529..3e82852 100644
--- a/home/sway/swayshot/swappy/default.nix
+++ b/modules/home/sway/swayshot/swappy/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
home = {
packages = with pkgs; [
swappy
diff --git a/home/sway/theme/default.nix b/modules/home/sway/theme/default.nix
similarity index 97%
rename from home/sway/theme/default.nix
rename to modules/home/sway/theme/default.nix
index 87dc758..6034c6c 100644
--- a/home/sway/theme/default.nix
+++ b/modules/home/sway/theme/default.nix
@@ -1,4 +1,5 @@
-{ config, pkgs, outputs, ... }: {
+{ config, pkgs, outputs, ... }:
+{
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
diff --git a/home/sway/waybar/default.nix b/modules/home/sway/waybar/default.nix
similarity index 99%
rename from home/sway/waybar/default.nix
rename to modules/home/sway/waybar/default.nix
index ca03ca4..27a140c 100644
--- a/home/sway/waybar/default.nix
+++ b/modules/home/sway/waybar/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
programs.waybar = let
swayWorkspacesModule = {
format = "{name}";
diff --git a/home/users/default.nix b/modules/home/users/default.nix
similarity index 75%
rename from home/users/default.nix
rename to modules/home/users/default.nix
index 8373bb1..4f6dbf4 100644
--- a/home/users/default.nix
+++ b/modules/home/users/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./jimbo
];
diff --git a/home/users/jimbo/default.nix b/modules/home/users/jimbo/default.nix
similarity index 95%
rename from home/users/jimbo/default.nix
rename to modules/home/users/jimbo/default.nix
index 3b75f9d..69b73a7 100644
--- a/home/users/jimbo/default.nix
+++ b/modules/home/users/jimbo/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
home = {
username = "jimbo";
homeDirectory = "/home/jimbo";
diff --git a/home/utils/default.nix b/modules/home/utils/default.nix
similarity index 85%
rename from home/utils/default.nix
rename to modules/home/utils/default.nix
index 7a6e543..2bbeeda 100644
--- a/home/utils/default.nix
+++ b/modules/home/utils/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./gnome-keyring
./udiskie
diff --git a/home/utils/gnome-keyring/default.nix b/modules/home/utils/gnome-keyring/default.nix
similarity index 79%
rename from home/utils/gnome-keyring/default.nix
rename to modules/home/utils/gnome-keyring/default.nix
index d9893d7..2e1ad40 100644
--- a/home/utils/gnome-keyring/default.nix
+++ b/modules/home/utils/gnome-keyring/default.nix
@@ -1,3 +1,4 @@
-{ ... }: {
+{ ... }:
+{
services.gnome-keyring.enable = true;
}
diff --git a/home/utils/udiskie/default.nix b/modules/home/utils/udiskie/default.nix
similarity index 86%
rename from home/utils/udiskie/default.nix
rename to modules/home/utils/udiskie/default.nix
index 33eb59f..fedeb78 100644
--- a/home/utils/udiskie/default.nix
+++ b/modules/home/utils/udiskie/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
services.udiskie = {
enable = true;
automount = false;
diff --git a/home/utils/zsh/default.nix b/modules/home/utils/zsh/default.nix
similarity index 98%
rename from home/utils/zsh/default.nix
rename to modules/home/utils/zsh/default.nix
index ffbc57c..e354e7a 100644
--- a/home/utils/zsh/default.nix
+++ b/modules/home/utils/zsh/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, config, outputs, ... }: {
+{ pkgs, config, outputs, ... }:
+{
programs.zsh = {
enable = true;
autosuggestion.enable = true;
diff --git a/system/accounts/default.nix b/modules/system/accounts/default.nix
similarity index 100%
rename from system/accounts/default.nix
rename to modules/system/accounts/default.nix
diff --git a/system/accounts/groups/default.nix b/modules/system/accounts/groups/default.nix
similarity index 76%
rename from system/accounts/groups/default.nix
rename to modules/system/accounts/groups/default.nix
index 10474ae..29a1695 100644
--- a/system/accounts/groups/default.nix
+++ b/modules/system/accounts/groups/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./nfsShare
];
diff --git a/system/accounts/groups/nfsShare/default.nix b/modules/system/accounts/groups/nfsShare/default.nix
similarity index 74%
rename from system/accounts/groups/nfsShare/default.nix
rename to modules/system/accounts/groups/nfsShare/default.nix
index 34722ff..9871b4e 100644
--- a/system/accounts/groups/nfsShare/default.nix
+++ b/modules/system/accounts/groups/nfsShare/default.nix
@@ -1,3 +1,4 @@
-{ ... }: {
+{ ... }:
+{
users.groups.nfsShare = {};
}
diff --git a/system/accounts/users/default.nix b/modules/system/accounts/users/default.nix
similarity index 87%
rename from system/accounts/users/default.nix
rename to modules/system/accounts/users/default.nix
index cb8fb96..f37ca73 100644
--- a/system/accounts/users/default.nix
+++ b/modules/system/accounts/users/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./jimbo
./liquidsoap
diff --git a/system/accounts/users/jimbo/default.nix b/modules/system/accounts/users/jimbo/default.nix
similarity index 95%
rename from system/accounts/users/jimbo/default.nix
rename to modules/system/accounts/users/jimbo/default.nix
index c9a8b8c..19bf7b2 100644
--- a/system/accounts/users/jimbo/default.nix
+++ b/modules/system/accounts/users/jimbo/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
users.users = {
jimbo = {
description = "Jimbo";
diff --git a/system/accounts/users/liquidsoap/default.nix b/modules/system/accounts/users/liquidsoap/default.nix
similarity index 62%
rename from system/accounts/users/liquidsoap/default.nix
rename to modules/system/accounts/users/liquidsoap/default.nix
index c1a2abd..264a72a 100644
--- a/system/accounts/users/liquidsoap/default.nix
+++ b/modules/system/accounts/users/liquidsoap/default.nix
@@ -1,6 +1,6 @@
+{ ... }:
{
- # Add service users to extra groups
- users.users = {
+ users.users = {
nextcloud = {
extraGroups = [ "nginx" ];
isSystemUser = true;
diff --git a/system/accounts/users/nextcloud/default.nix b/modules/system/accounts/users/nextcloud/default.nix
similarity index 74%
rename from system/accounts/users/nextcloud/default.nix
rename to modules/system/accounts/users/nextcloud/default.nix
index f94c29c..1ec736c 100644
--- a/system/accounts/users/nextcloud/default.nix
+++ b/modules/system/accounts/users/nextcloud/default.nix
@@ -1,5 +1,4 @@
-{
- # Add service users to extra groups
+{ ... }: {
users.users = {
nextcloud = {
extraGroups = [ "nfsShare" ];
diff --git a/system/accounts/users/nginx/default.nix b/modules/system/accounts/users/nginx/default.nix
similarity index 77%
rename from system/accounts/users/nginx/default.nix
rename to modules/system/accounts/users/nginx/default.nix
index 680f810..304ff44 100644
--- a/system/accounts/users/nginx/default.nix
+++ b/modules/system/accounts/users/nginx/default.nix
@@ -1,5 +1,5 @@
+{ ... }:
{
- # Add service users to extra groups
users.users = {
nginx = {
extraGroups = [ "turnserver" "virtualMail" ];
diff --git a/system/default.nix b/modules/system/default.nix
similarity index 53%
rename from system/default.nix
rename to modules/system/default.nix
index 6328244..e9c5c3e 100644
--- a/system/default.nix
+++ b/modules/system/default.nix
@@ -7,32 +7,29 @@
./services/garbage-collection
];
- nixpkgs.config.allowUnfree = true;
-
- nix.settings = {
- experimental-features = "nix-command flakes";
- auto-optimise-store = true;
+ nix = {
+ settings = {
+ experimental-features = "nix-command flakes";
+ auto-optimise-store = true;
+ };
+ gc = {
+ automatic = true;
+ dates = "weekly";
+ options = "--delete-older-than 1w";
+ };
};
time.timeZone = outputs.secrets.timeZone;
- console = {
- earlySetup = true;
- font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz";
- packages = with pkgs; [ terminus_font ];
- };
-
programs = {
zsh.enable = true;
nano.enable = false;
};
- # Disable the HTML documentation applet
documentation = {
nixos.enable = false;
info.enable = false;
};
- # Allow binary firmware
hardware.enableRedistributableFirmware = true;
}
diff --git a/modules/system/desktop/default.nix b/modules/system/desktop/default.nix
new file mode 100644
index 0000000..e413a8c
--- /dev/null
+++ b/modules/system/desktop/default.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ imports = [
+ ./qt
+ ./wayland
+ ./sway
+ ];
+}
diff --git a/system/programs/theming/qt/default.nix b/modules/system/desktop/qt/default.nix
similarity index 88%
rename from system/programs/theming/qt/default.nix
rename to modules/system/desktop/qt/default.nix
index 8ec8567..c52443f 100644
--- a/system/programs/theming/qt/default.nix
+++ b/modules/system/desktop/qt/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
qt = {
enable = true;
style = "gtk2";
diff --git a/system/programs/sway/default.nix b/modules/system/desktop/sway/default.nix
similarity index 90%
rename from system/programs/sway/default.nix
rename to modules/system/desktop/sway/default.nix
index d59e8e0..5b08f9a 100644
--- a/system/programs/sway/default.nix
+++ b/modules/system/desktop/sway/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
imports = [
./greetd
];
@@ -15,7 +16,6 @@
# Allow swaylock to function
security.pam.services.swaylock = {};
- # Enable desktop portals for screengrab
xdg.portal = {
wlr = {
enable = true;
diff --git a/system/programs/sway/greetd/default.nix b/modules/system/desktop/sway/greetd/default.nix
similarity index 90%
rename from system/programs/sway/greetd/default.nix
rename to modules/system/desktop/sway/greetd/default.nix
index 152fe4a..296a1dc 100644
--- a/system/programs/sway/greetd/default.nix
+++ b/modules/system/desktop/sway/greetd/default.nix
@@ -1,11 +1,11 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
services = {
# Configure greetd for "auto" login (single user only)
greetd = let
startSway = pkgs.writeScript "startsway" ''
# Use NVIDIA variables if drivers are in use
if lspci -k | grep "Kernel driver in use: nvidia" &> /dev/null; then
- # NVIDIA/AMD variables
export LIBVA_DRIVER_NAME=nvidia
export GBM_BACKEND=nvidia-drm
export __GLX_VENDOR_LIBRARY_NAME=nvidia
@@ -14,11 +14,9 @@
:
fi
- # Sway/Wayland
export XDG_CURRENT_DESKTOP=sway
export QT_QPA_PLATFORM="wayland;xcb"
- # Start Sway
sway --unsupported-gpu
'';
in {
diff --git a/modules/system/desktop/wayland/default.nix b/modules/system/desktop/wayland/default.nix
new file mode 100644
index 0000000..7b446ae
--- /dev/null
+++ b/modules/system/desktop/wayland/default.nix
@@ -0,0 +1,13 @@
+{ pkgs, ... }:
+{
+ programs = {
+ dconf.enable = true;
+ light.enable = true;
+ xwayland.enable = true;
+ };
+
+ services = {
+ dbus.enable = true;
+ tlp.enable = true;
+ };
+}
diff --git a/system/modules/bluetooth/default.nix b/modules/system/devices/bluetooth/default.nix
similarity index 79%
rename from system/modules/bluetooth/default.nix
rename to modules/system/devices/bluetooth/default.nix
index 2dcde0b..6b60031 100644
--- a/system/modules/bluetooth/default.nix
+++ b/modules/system/devices/bluetooth/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
hardware.bluetooth = {
enable = true;
settings = {
@@ -7,7 +8,7 @@
};
};
- # Enable lingering for Bluetooth
+ # Lingering helps keep headphones connected
systemd.tmpfiles.rules = [
"f /var/lib/systemd/linger/jimbo"
];
diff --git a/system/modules/boot/extlinux/default.nix b/modules/system/devices/boot/extlinux/default.nix
similarity index 91%
rename from system/modules/boot/extlinux/default.nix
rename to modules/system/devices/boot/extlinux/default.nix
index bdd0f35..f32c3f8 100644
--- a/system/modules/boot/extlinux/default.nix
+++ b/modules/system/devices/boot/extlinux/default.nix
@@ -1,3 +1,4 @@
+{ ... }:
{
boot.loader = {
generic-extlinux-compatible.enable = true;
diff --git a/modules/system/devices/boot/lanzaboote/default.nix b/modules/system/devices/boot/lanzaboote/default.nix
new file mode 100644
index 0000000..7a62227
--- /dev/null
+++ b/modules/system/devices/boot/lanzaboote/default.nix
@@ -0,0 +1,7 @@
+{ ... }:
+{
+ boot.lanzaboote = {
+ enable = true;
+ pkiBundle = "/etc/secureboot";
+ };
+}
diff --git a/system/modules/boot/systemd/default.nix b/modules/system/devices/boot/systemd/default.nix
similarity index 90%
rename from system/modules/boot/systemd/default.nix
rename to modules/system/devices/boot/systemd/default.nix
index 244ac0b..9eb9f12 100644
--- a/system/modules/boot/systemd/default.nix
+++ b/modules/system/devices/boot/systemd/default.nix
@@ -1,3 +1,4 @@
+{ ... }:
{
boot.loader.systemd-boot = {
enable = true;
diff --git a/system/modules/default.nix b/modules/system/devices/default.nix
similarity index 92%
rename from system/modules/default.nix
rename to modules/system/devices/default.nix
index d8038e6..6e6ad7a 100644
--- a/system/modules/default.nix
+++ b/modules/system/devices/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./bluetooth
./filesystems
diff --git a/system/modules/filesystems/default.nix b/modules/system/devices/filesystems/default.nix
similarity index 87%
rename from system/modules/filesystems/default.nix
rename to modules/system/devices/filesystems/default.nix
index f24fd90..522fb9f 100644
--- a/system/modules/filesystems/default.nix
+++ b/modules/system/devices/filesystems/default.nix
@@ -1,4 +1,5 @@
-{ lib, ... }: {
+{ lib, ... }:
+{
boot.supportedFilesystems = {
ntfs = true;
zfs = lib.mkForce false;
diff --git a/system/modules/networking/default.nix b/modules/system/devices/networking/default.nix
similarity index 69%
rename from system/modules/networking/default.nix
rename to modules/system/devices/networking/default.nix
index c7c5a69..1abbd40 100644
--- a/system/modules/networking/default.nix
+++ b/modules/system/devices/networking/default.nix
@@ -1,8 +1,5 @@
-{ ... }: {
- imports = [
- ./wireless
- ];
-
+{ ... }:
+{
networking = {
wireless.enable = false;
dhcpcd.enable = true;
diff --git a/modules/system/devices/networking/firewall/pc/default.nix b/modules/system/devices/networking/firewall/pc/default.nix
new file mode 100644
index 0000000..4d972c9
--- /dev/null
+++ b/modules/system/devices/networking/firewall/pc/default.nix
@@ -0,0 +1,9 @@
+{ outputs, ... }:
+{
+ networking.firewall = {
+ allowPing = false;
+ extraInputRules = ''
+ ip saddr { ${outputs.ips.server}, ${outputs.ips.wgSpan}.1 } accept comment "Accept Server"
+ '';
+ };
+}
diff --git a/system/services/firewall/server/default.nix b/modules/system/devices/networking/firewall/server/default.nix
similarity index 99%
rename from system/services/firewall/server/default.nix
rename to modules/system/devices/networking/firewall/server/default.nix
index 83d5336..9e3e162 100644
--- a/system/services/firewall/server/default.nix
+++ b/modules/system/devices/networking/firewall/server/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
# Allow forwarding
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
diff --git a/system/services/wireguard/client/default.nix b/modules/system/devices/networking/wireguard/client/default.nix
similarity index 96%
rename from system/services/wireguard/client/default.nix
rename to modules/system/devices/networking/wireguard/client/default.nix
index 9a08f57..360bb41 100644
--- a/system/services/wireguard/client/default.nix
+++ b/modules/system/devices/networking/wireguard/client/default.nix
@@ -1,4 +1,5 @@
-{outputs, ...}: {
+{ outputs, ... }:
+{
networking.firewall = {
allowedUDPPorts = [ 51820 ];
};
diff --git a/system/services/wireguard/server/default.nix b/modules/system/devices/networking/wireguard/host/default.nix
similarity index 92%
rename from system/services/wireguard/server/default.nix
rename to modules/system/devices/networking/wireguard/host/default.nix
index 94b215e..2b725da 100644
--- a/system/services/wireguard/server/default.nix
+++ b/modules/system/devices/networking/wireguard/host/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
networking = {
nat = {
enable = true;
@@ -14,7 +15,7 @@
"${outputs.ips.wgInt}" = {
ips = [ "${outputs.ips.wgSpan}.1/24" ];
listenPort = 51820;
- privateKey = outputs.secrets.wgServerPriv;
+ privateKey = outputs.secrets.wgServerPriv;
peers = [
{ # Jimbo Pixel 9
publicKey = outputs.secrets.wgPixel9Pub;
diff --git a/modules/system/devices/networking/wireless/default.nix b/modules/system/devices/networking/wireless/default.nix
new file mode 100644
index 0000000..862db58
--- /dev/null
+++ b/modules/system/devices/networking/wireless/default.nix
@@ -0,0 +1,7 @@
+{ lib, config, ... }:
+{
+ networking = {
+ wireless.iwd.enable = true;
+ enableB43Firmware = true;
+ };
+}
diff --git a/system/modules/pipewire/default.nix b/modules/system/devices/pipewire/default.nix
similarity index 96%
rename from system/modules/pipewire/default.nix
rename to modules/system/devices/pipewire/default.nix
index 2fc5cde..35430c3 100644
--- a/system/modules/pipewire/default.nix
+++ b/modules/system/devices/pipewire/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
services = {
pipewire = {
enable = true;
diff --git a/system/modules/printing/default.nix b/modules/system/devices/printing/default.nix
similarity index 94%
rename from system/modules/printing/default.nix
rename to modules/system/devices/printing/default.nix
index a6ad026..5c509da 100644
--- a/system/modules/printing/default.nix
+++ b/modules/system/devices/printing/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
services = {
printing = {
enable = true;
diff --git a/modules/system/devices/udev/default.nix b/modules/system/devices/udev/default.nix
new file mode 100644
index 0000000..3c5941a
--- /dev/null
+++ b/modules/system/devices/udev/default.nix
@@ -0,0 +1,7 @@
+{ ... }:
+{
+ imports = [
+ ./pdp
+ ./oculus
+ ];
+}
diff --git a/system/modules/udev/default.nix b/modules/system/devices/udev/oculus/default.nix
similarity index 53%
rename from system/modules/udev/default.nix
rename to modules/system/devices/udev/oculus/default.nix
index 5d042de..db86902 100644
--- a/system/modules/udev/default.nix
+++ b/modules/system/devices/udev/oculus/default.nix
@@ -1,11 +1,6 @@
-{ pkgs, ... }: {
- # Rules to make PDP controller and Oculus Rift CV1 work
+{ pkgs, ... }:
+{
services.udev = let
- pdpRules = pkgs.writeTextFile {
- name = "10-pdp.rules";
- text = ''SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"'';
- destination = "/etc/udev/rules.d/10-pdp.rules";
- };
oculusRules = pkgs.writeTextFile {
name = "10-oculus.rules";
text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"'';
@@ -14,7 +9,6 @@
in {
packages = [
oculusRules
- pdpRules
];
};
}
diff --git a/modules/system/devices/udev/pdp/default.nix b/modules/system/devices/udev/pdp/default.nix
new file mode 100644
index 0000000..652309f
--- /dev/null
+++ b/modules/system/devices/udev/pdp/default.nix
@@ -0,0 +1,14 @@
+{ pkgs, ... }:
+{
+ services.udev = let
+ pdpRules = pkgs.writeTextFile {
+ name = "10-pdp.rules";
+ text = ''SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"'';
+ destination = "/etc/udev/rules.d/10-pdp.rules";
+ };
+ in {
+ packages = [
+ pdpRules
+ ];
+ };
+}
diff --git a/system/modules/video/default.nix b/modules/system/devices/video/default.nix
similarity index 75%
rename from system/modules/video/default.nix
rename to modules/system/devices/video/default.nix
index 8e59782..34ef10a 100644
--- a/system/modules/video/default.nix
+++ b/modules/system/devices/video/default.nix
@@ -1,9 +1,5 @@
-{ pkgs, ... }: {
- imports = [
- ./nvidia
- ./nouveau
- ];
-
+{ pkgs, ... }:
+{
hardware.opengl = {
enable = true;
driSupport32Bit = true;
diff --git a/modules/system/devices/video/nouveau/default.nix b/modules/system/devices/video/nouveau/default.nix
new file mode 100644
index 0000000..41aeb2c
--- /dev/null
+++ b/modules/system/devices/video/nouveau/default.nix
@@ -0,0 +1,4 @@
+{ config, lib, ... }:
+{
+ services.xserver.videoDrivers = [ "nouveau" ];
+}
diff --git a/modules/system/devices/video/nvidia/default.nix b/modules/system/devices/video/nvidia/default.nix
new file mode 100644
index 0000000..b50af2d
--- /dev/null
+++ b/modules/system/devices/video/nvidia/default.nix
@@ -0,0 +1,10 @@
+{ pkgs, config, lib, ... }:
+{
+ services.xserver.videoDrivers = [ "nvidia" ];
+ hardware.nvidia = {
+ modesetting.enable = true;
+ nvidiaSettings = false;
+ package = config.boot.kernelPackages.nvidiaPackages.beta;
+ open = false;
+ };
+}
diff --git a/system/programs/theming/fonts/default.nix b/modules/system/fonts/default.nix
similarity index 71%
rename from system/programs/theming/fonts/default.nix
rename to modules/system/fonts/default.nix
index c0a2569..da7080b 100644
--- a/system/programs/theming/fonts/default.nix
+++ b/modules/system/fonts/default.nix
@@ -16,4 +16,9 @@
"Twitter Color Emoji"
];
};
+
+ console = {
+ font = "${pkgs.terminus_font}/share/consolefonts/ter-u22n.psf.gz";
+ packages = with pkgs; [ terminus_font ];
+ };
}
diff --git a/hosts/JimServer/hardware-configuration.nix b/modules/system/hardware/cyberspark/default.nix
similarity index 92%
rename from hosts/JimServer/hardware-configuration.nix
rename to modules/system/hardware/cyberspark/default.nix
index 18e5f8f..e112d0c 100644
--- a/hosts/JimServer/hardware-configuration.nix
+++ b/modules/system/hardware/cyberspark/default.nix
@@ -1,11 +1,9 @@
{ config, outputs, lib, pkgs, modulesPath, ... }:
-
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
- # Set all boot options
boot = {
blacklistedKernelModules = [
"pcspkr"
@@ -24,9 +22,12 @@
"kvm-intel"
];
};
- swraid.mdadmConf = ''
- MAILADDR jimbo@${outputs.secrets.jimDomain}
- '';
+ swraid = {
+ enable = true;
+ mdadmConf = ''
+ MAILADDR jimbo@${outputs.secrets.jimDomain}
+ '';
+ };
};
# Mounting options
@@ -102,11 +103,8 @@
{ device = "/dev/disk/by-uuid/ec422cad-bf93-4b15-b989-2c807f1073a4"; }
];
- # Enables DHCP on each ethernet and wireless interface.
- networking.useDHCP = lib.mkDefault true;
-
# Hardware settings
- boot.swraid.enable = true;
+ networking.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}
diff --git a/hosts/JimDesktop/hardware-configuration.nix b/modules/system/hardware/firefly/default.nix
similarity index 96%
rename from hosts/JimDesktop/hardware-configuration.nix
rename to modules/system/hardware/firefly/default.nix
index 8dfaf0b..e5a11f5 100644
--- a/hosts/JimDesktop/hardware-configuration.nix
+++ b/modules/system/hardware/firefly/default.nix
@@ -1,4 +1,5 @@
-{ config, lib, pkgs, outputs, modulesPath, ... }: let
+{ config, lib, pkgs, outputs, modulesPath, ... }:
+let
# Set common boot paramaters
commonKernelParams = [
# Nvidia settings
@@ -24,7 +25,6 @@ in {
# Set all boot options
boot = {
- # Set a kernel version and load/blacklist drivers
kernelPackages = pkgs.unstable.linuxPackages_zen;
blacklistedKernelModules = [
"pcspkr"
diff --git a/hosts/JimPine/hardware-configuration.nix b/modules/system/hardware/shuttleworth/default.nix
similarity index 84%
rename from hosts/JimPine/hardware-configuration.nix
rename to modules/system/hardware/shuttleworth/default.nix
index 6dcf942..2336291 100644
--- a/hosts/JimPine/hardware-configuration.nix
+++ b/modules/system/hardware/shuttleworth/default.nix
@@ -1,5 +1,4 @@
{ config, outputs, lib, pkgs, modulesPath, ... }:
-
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@@ -32,11 +31,6 @@
fsType = "nfs4";
options = ["x-systemd.automount" "_netdev" "nofail" "noauto"];
};
- "/home/jimbo/FreecornNFS" = {
- device = "${outputs.secrets.cornIP}:/export/freecornNFS";
- fsType = "nfs4";
- options = ["x-systemd.automount" "_netdev" "nofail" "noauto"];
- };
};
swapDevices = [
diff --git a/system/programs/appimage/default.nix b/modules/system/programs/appimage/default.nix
similarity index 86%
rename from system/programs/appimage/default.nix
rename to modules/system/programs/appimage/default.nix
index a7db39a..a890a25 100644
--- a/system/programs/appimage/default.nix
+++ b/modules/system/programs/appimage/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
programs.appimage = {
enable = true;
binfmt = true;
diff --git a/modules/system/programs/default.nix b/modules/system/programs/default.nix
new file mode 100644
index 0000000..cbc336a
--- /dev/null
+++ b/modules/system/programs/default.nix
@@ -0,0 +1,9 @@
+{ ... }:
+{
+ imports = [
+ ./appimage
+ ./gaming
+ ./git
+ ./security
+ ];
+}
diff --git a/system/programs/gaming/default.nix b/modules/system/programs/gaming/default.nix
similarity index 88%
rename from system/programs/gaming/default.nix
rename to modules/system/programs/gaming/default.nix
index cb47b6b..87b879f 100644
--- a/system/programs/gaming/default.nix
+++ b/modules/system/programs/gaming/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ ... }:
+{
programs.gamemode = {
enable = true;
settings.general.renice = 10;
diff --git a/system/programs/git/default.nix b/modules/system/programs/git/default.nix
similarity index 89%
rename from system/programs/git/default.nix
rename to modules/system/programs/git/default.nix
index 9aa21c3..42a3d3c 100644
--- a/system/programs/git/default.nix
+++ b/modules/system/programs/git/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./gpg
];
diff --git a/system/programs/git/gpg/default.nix b/modules/system/programs/git/gpg/default.nix
similarity index 88%
rename from system/programs/git/gpg/default.nix
rename to modules/system/programs/git/gpg/default.nix
index 334fc56..7fbd7dd 100644
--- a/system/programs/git/gpg/default.nix
+++ b/modules/system/programs/git/gpg/default.nix
@@ -1,8 +1,10 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
+
environment.systemPackages = with pkgs; [
git-crypt
];
diff --git a/system/modules/security/apparmor/default.nix b/modules/system/programs/security/apparmor/default.nix
similarity index 77%
rename from system/modules/security/apparmor/default.nix
rename to modules/system/programs/security/apparmor/default.nix
index 49498f4..d247578 100644
--- a/system/modules/security/apparmor/default.nix
+++ b/modules/system/programs/security/apparmor/default.nix
@@ -1,3 +1,4 @@
-{ ... }: {
+{ ... }:
+{
security.apparmor.enable = true;
}
diff --git a/system/modules/security/default.nix b/modules/system/programs/security/default.nix
similarity index 87%
rename from system/modules/security/default.nix
rename to modules/system/programs/security/default.nix
index ae30326..5815e87 100644
--- a/system/modules/security/default.nix
+++ b/modules/system/programs/security/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./apparmor
./doas
diff --git a/system/modules/security/doas/default.nix b/modules/system/programs/security/doas/default.nix
similarity index 95%
rename from system/modules/security/doas/default.nix
rename to modules/system/programs/security/doas/default.nix
index 31bf677..f182327 100644
--- a/system/modules/security/doas/default.nix
+++ b/modules/system/programs/security/doas/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
security = {
sudo.enable = false;
doas = {
diff --git a/system/modules/security/gnome-keyring/default.nix b/modules/system/programs/security/gnome-keyring/default.nix
similarity index 81%
rename from system/modules/security/gnome-keyring/default.nix
rename to modules/system/programs/security/gnome-keyring/default.nix
index f421dfc..081985c 100644
--- a/system/modules/security/gnome-keyring/default.nix
+++ b/modules/system/programs/security/gnome-keyring/default.nix
@@ -1,3 +1,4 @@
-{ ... }: {
+{ ... }:
+{
services.gnome.gnome-keyring.enable = true;
}
diff --git a/system/modules/security/polkit/default.nix b/modules/system/programs/security/polkit/default.nix
similarity index 86%
rename from system/modules/security/polkit/default.nix
rename to modules/system/programs/security/polkit/default.nix
index 391a55a..b8b850e 100644
--- a/system/modules/security/polkit/default.nix
+++ b/modules/system/programs/security/polkit/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
security = {
polkit.enable = true;
rtkit.enable = true;
diff --git a/system/services/acme/default.nix b/modules/system/services/acme/default.nix
similarity index 93%
rename from system/services/acme/default.nix
rename to modules/system/services/acme/default.nix
index 542457a..20070f1 100644
--- a/system/services/acme/default.nix
+++ b/modules/system/services/acme/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
security.acme = {
acceptTerms = true;
defaults.email = outputs.secrets.jimEmail;
diff --git a/system/services/ddclient/default.nix b/modules/system/services/ddclient/default.nix
similarity index 91%
rename from system/services/ddclient/default.nix
rename to modules/system/services/ddclient/default.nix
index a98fb63..e3e8759 100644
--- a/system/services/ddclient/default.nix
+++ b/modules/system/services/ddclient/default.nix
@@ -1,5 +1,5 @@
-{ pkgs, outputs, ... }: {
- # Dynamic IPs for Cloudflare records
+{ pkgs, outputs, ... }:
+{
services.ddclient = {
enable = true;
protocol = "cloudflare";
diff --git a/system/services/fileserver/default.nix b/modules/system/services/fileserver/default.nix
similarity index 80%
rename from system/services/fileserver/default.nix
rename to modules/system/services/fileserver/default.nix
index f22c5da..5db3fb2 100644
--- a/system/services/fileserver/default.nix
+++ b/modules/system/services/fileserver/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./local
./public
diff --git a/system/services/fileserver/local/default.nix b/modules/system/services/fileserver/local/default.nix
similarity index 79%
rename from system/services/fileserver/local/default.nix
rename to modules/system/services/fileserver/local/default.nix
index 3405606..c10f4f6 100644
--- a/system/services/fileserver/local/default.nix
+++ b/modules/system/services/fileserver/local/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./nfs
./samba
diff --git a/system/services/fileserver/local/nfs/default.nix b/modules/system/services/fileserver/local/nfs/default.nix
similarity index 91%
rename from system/services/fileserver/local/nfs/default.nix
rename to modules/system/services/fileserver/local/nfs/default.nix
index a90342a..7dd1502 100644
--- a/system/services/fileserver/local/nfs/default.nix
+++ b/modules/system/services/fileserver/local/nfs/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
services.nfs.server = {
enable = true;
exports = ''
diff --git a/system/services/fileserver/local/samba/default.nix b/modules/system/services/fileserver/local/samba/default.nix
similarity index 97%
rename from system/services/fileserver/local/samba/default.nix
rename to modules/system/services/fileserver/local/samba/default.nix
index c1cf2c8..e95e6d8 100644
--- a/system/services/fileserver/local/samba/default.nix
+++ b/modules/system/services/fileserver/local/samba/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services = {
samba = {
enable = true;
diff --git a/system/services/fileserver/public/default.nix b/modules/system/services/fileserver/public/default.nix
similarity index 83%
rename from system/services/fileserver/public/default.nix
rename to modules/system/services/fileserver/public/default.nix
index e1b98c7..252fe21 100644
--- a/system/services/fileserver/public/default.nix
+++ b/modules/system/services/fileserver/public/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./nextcloud
./photoprism
diff --git a/system/services/fileserver/public/nextcloud/default.nix b/modules/system/services/fileserver/public/nextcloud/default.nix
similarity index 98%
rename from system/services/fileserver/public/nextcloud/default.nix
rename to modules/system/services/fileserver/public/nextcloud/default.nix
index 1ce89bf..bcef9dd 100644
--- a/system/services/fileserver/public/nextcloud/default.nix
+++ b/modules/system/services/fileserver/public/nextcloud/default.nix
@@ -1,4 +1,5 @@
-{pkgs, outputs, ...}: {
+{ pkgs, outputs, ... }:
+{
services = {
nextcloud = {
enable = true;
diff --git a/system/services/fileserver/public/photoprism/default.nix b/modules/system/services/fileserver/public/photoprism/default.nix
similarity index 97%
rename from system/services/fileserver/public/photoprism/default.nix
rename to modules/system/services/fileserver/public/photoprism/default.nix
index 013ab1a..b1b9d76 100644
--- a/system/services/fileserver/public/photoprism/default.nix
+++ b/modules/system/services/fileserver/public/photoprism/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services = {
photoprism = {
enable = true;
diff --git a/system/services/forgejo/default.nix b/modules/system/services/forgejo/default.nix
similarity index 82%
rename from system/services/forgejo/default.nix
rename to modules/system/services/forgejo/default.nix
index 503d68d..f46c11f 100644
--- a/system/services/forgejo/default.nix
+++ b/modules/system/services/forgejo/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
imports = [
./nginx
];
@@ -14,9 +15,9 @@
SSH_PORT = 2299;
START_SSH_SERVER = true;
};
- ui = {
- DEFAULT_THEME = "forgejo-dark";
- };
+ ui = {
+ DEFAULT_THEME = "forgejo-dark";
+ };
mailer = {
ENABLED = true;
SMTP_ADDR = "mx.${outputs.secrets.jimDomain}";
@@ -26,8 +27,8 @@
PROTOCOL = "smtps";
};
service = {
- REGISTER_EMAIL_CONFIRM = true;
- DISABLE_REGISTRATION = true;
+ REGISTER_EMAIL_CONFIRM = true;
+ DISABLE_REGISTRATION = true;
};
};
};
diff --git a/system/services/forgejo/nginx/default.nix b/modules/system/services/forgejo/nginx/default.nix
similarity index 91%
rename from system/services/forgejo/nginx/default.nix
rename to modules/system/services/forgejo/nginx/default.nix
index cb7ffa2..a056a3b 100644
--- a/system/services/forgejo/nginx/default.nix
+++ b/modules/system/services/forgejo/nginx/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services.nginx.virtualHosts."git.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/icecast/default.nix b/modules/system/services/icecast/default.nix
similarity index 93%
rename from system/services/icecast/default.nix
rename to modules/system/services/icecast/default.nix
index e75b21d..419f08e 100644
--- a/system/services/icecast/default.nix
+++ b/modules/system/services/icecast/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
imports = [
./nginx
];
@@ -16,10 +17,10 @@
${outputs.secrets.castSourcePass}
-
- Canada
- jimbo@jimbosfiles.com
-
+
+ Canada
+ jimbo@jimbosfiles.com
+
/jimbops.opus
JimBops Radio
diff --git a/system/services/icecast/nginx/default.nix b/modules/system/services/icecast/nginx/default.nix
similarity index 91%
rename from system/services/icecast/nginx/default.nix
rename to modules/system/services/icecast/nginx/default.nix
index 2e3439e..b3864d4 100644
--- a/system/services/icecast/nginx/default.nix
+++ b/modules/system/services/icecast/nginx/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
services.nginx.virtualHosts."icecast.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/mailserver/default.nix b/modules/system/services/mailserver/default.nix
similarity index 98%
rename from system/services/mailserver/default.nix
rename to modules/system/services/mailserver/default.nix
index 589be77..6f3f9b2 100644
--- a/system/services/mailserver/default.nix
+++ b/modules/system/services/mailserver/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: rec {
+{ pkgs, outputs, ... }:
+{
imports = [
./nginx
./roundcube
diff --git a/system/services/mailserver/nginx/default.nix b/modules/system/services/mailserver/nginx/default.nix
similarity index 88%
rename from system/services/mailserver/nginx/default.nix
rename to modules/system/services/mailserver/nginx/default.nix
index 8d54dae..011b322 100644
--- a/system/services/mailserver/nginx/default.nix
+++ b/modules/system/services/mailserver/nginx/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: rec {
+{ pkgs, outputs, ... }:
+{
services.nginx.virtualHosts."mx.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/mailserver/roundcube/default.nix b/modules/system/services/mailserver/roundcube/default.nix
similarity index 66%
rename from system/services/mailserver/roundcube/default.nix
rename to modules/system/services/mailserver/roundcube/default.nix
index 584b002..df54711 100644
--- a/system/services/mailserver/roundcube/default.nix
+++ b/modules/system/services/mailserver/roundcube/default.nix
@@ -1,9 +1,10 @@
-{ pkgs, outputs, ... }: rec {
+{ pkgs, outputs, ... }:
+{
services.roundcube = {
enable = true;
hostName = "mail.${outputs.secrets.jimDomain}";
extraConfig = ''
- $config['smtp_server'] = "tls://${mailserver.fqdn}";
+ $config['smtp_server'] = "tls://mx.${outputs.secrets.jimDomain}";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
'';
diff --git a/system/services/minecraft/common/default.nix b/modules/system/services/minecraft/common/default.nix
similarity index 99%
rename from system/services/minecraft/common/default.nix
rename to modules/system/services/minecraft/common/default.nix
index b46489b..2528232 100644
--- a/system/services/minecraft/common/default.nix
+++ b/modules/system/services/minecraft/common/default.nix
@@ -1,4 +1,5 @@
-{pkgs, ...}: {
+{ pkgs, ... }:
+{
# Common properties
serverProperties = {
enforce-secure-profile = false;
diff --git a/system/services/minecraft/common/essentialsconfig.yml b/modules/system/services/minecraft/common/essentialsconfig.yml
similarity index 100%
rename from system/services/minecraft/common/essentialsconfig.yml
rename to modules/system/services/minecraft/common/essentialsconfig.yml
diff --git a/system/services/minecraft/common/vcserver.properties b/modules/system/services/minecraft/common/vcserver.properties
similarity index 100%
rename from system/services/minecraft/common/vcserver.properties
rename to modules/system/services/minecraft/common/vcserver.properties
diff --git a/system/services/minecraft/default.nix b/modules/system/services/minecraft/default.nix
similarity index 94%
rename from system/services/minecraft/default.nix
rename to modules/system/services/minecraft/default.nix
index 2fc1955..8ab54a6 100644
--- a/system/services/minecraft/default.nix
+++ b/modules/system/services/minecraft/default.nix
@@ -1,4 +1,5 @@
-{ inputs, ... }: {
+{ inputs, ... }:
+{
imports = [
inputs.minecraft.nixosModules.minecraft-servers
./servers/velocity
diff --git a/system/services/minecraft/servers/blockworld/default.nix b/modules/system/services/minecraft/servers/blockworld/default.nix
similarity index 96%
rename from system/services/minecraft/servers/blockworld/default.nix
rename to modules/system/services/minecraft/servers/blockworld/default.nix
index 93231de..47f7205 100644
--- a/system/services/minecraft/servers/blockworld/default.nix
+++ b/modules/system/services/minecraft/servers/blockworld/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: let
+{ pkgs, ... }:
+let
common = import ../common.nix { inherit pkgs; };
in {
services.minecraft-servers.servers.blockworld = {
diff --git a/system/services/minecraft/servers/dewdemolisher/default.nix b/modules/system/services/minecraft/servers/dewdemolisher/default.nix
similarity index 96%
rename from system/services/minecraft/servers/dewdemolisher/default.nix
rename to modules/system/services/minecraft/servers/dewdemolisher/default.nix
index 010db5a..1656361 100644
--- a/system/services/minecraft/servers/dewdemolisher/default.nix
+++ b/modules/system/services/minecraft/servers/dewdemolisher/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: let
+{ pkgs, ... }:
+let
common = import ../common.nix { inherit pkgs; };
in {
services.minecraft-servers.servers.dewdemolisher = {
diff --git a/system/services/minecraft/servers/johnside/default.nix b/modules/system/services/minecraft/servers/johnside/default.nix
similarity index 98%
rename from system/services/minecraft/servers/johnside/default.nix
rename to modules/system/services/minecraft/servers/johnside/default.nix
index 5c25506..adea9cc 100644
--- a/system/services/minecraft/servers/johnside/default.nix
+++ b/modules/system/services/minecraft/servers/johnside/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: let
+{ pkgs, outputs, ... }:
+let
common = import ../common.nix { inherit pkgs; };
in {
services = {
diff --git a/system/services/minecraft/servers/roguecraft/default.nix b/modules/system/services/minecraft/servers/roguecraft/default.nix
similarity index 98%
rename from system/services/minecraft/servers/roguecraft/default.nix
rename to modules/system/services/minecraft/servers/roguecraft/default.nix
index 313e249..68a17ee 100644
--- a/system/services/minecraft/servers/roguecraft/default.nix
+++ b/modules/system/services/minecraft/servers/roguecraft/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: let
+{ pkgs, outputs, ... }:
+let
common = import ../common.nix { inherit pkgs; };
in {
services = {
diff --git a/system/services/minecraft/servers/uberbeta/default.nix b/modules/system/services/minecraft/servers/uberbeta/default.nix
similarity index 97%
rename from system/services/minecraft/servers/uberbeta/default.nix
rename to modules/system/services/minecraft/servers/uberbeta/default.nix
index ceaf7d5..b04b21d 100644
--- a/system/services/minecraft/servers/uberbeta/default.nix
+++ b/modules/system/services/minecraft/servers/uberbeta/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: let
+{ pkgs, ... }:
+let
common = import ../common.nix { inherit pkgs; };
uberBukkitZip = pkgs.fetchzip {
url = "https://github.com/Moresteck/Project-Poseidon-Uberbukkit/releases/download/2.0.0/uberbukkit-2.0.0-java17.zip";
diff --git a/system/services/minecraft/servers/velocity/default.nix b/modules/system/services/minecraft/servers/velocity/default.nix
similarity index 99%
rename from system/services/minecraft/servers/velocity/default.nix
rename to modules/system/services/minecraft/servers/velocity/default.nix
index c3f1289..651d5a5 100644
--- a/system/services/minecraft/servers/velocity/default.nix
+++ b/modules/system/services/minecraft/servers/velocity/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: let
+{ pkgs, ... }:
+let
common = import ../common.nix { inherit pkgs; };
in {
services.minecraft-servers.servers.velocity = {
diff --git a/system/services/misc/server/default.nix b/modules/system/services/misc/default.nix
similarity index 89%
rename from system/services/misc/server/default.nix
rename to modules/system/services/misc/default.nix
index ab24c8f..e976caf 100644
--- a/system/services/misc/server/default.nix
+++ b/modules/system/services/misc/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
services = {
snowflake-proxy.enable = true;
logrotate.checkConfig = false;
diff --git a/system/services/mpd/default.nix b/modules/system/services/mpd/default.nix
similarity index 94%
rename from system/services/mpd/default.nix
rename to modules/system/services/mpd/default.nix
index a960102..6d866ec 100644
--- a/system/services/mpd/default.nix
+++ b/modules/system/services/mpd/default.nix
@@ -1,4 +1,5 @@
-{ config, pkgs, ... }: {
+{ config, ... }:
+{
services.mpd = {
enable = true;
user = "jimbo";
diff --git a/system/services/mysql/default.nix b/modules/system/services/mysql/default.nix
similarity index 96%
rename from system/services/mysql/default.nix
rename to modules/system/services/mysql/default.nix
index baf4f2c..5e999b9 100644
--- a/system/services/mysql/default.nix
+++ b/modules/system/services/mysql/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
services.mysql = {
enable = true;
package = pkgs.mariadb;
diff --git a/system/services/misc/pc/default.nix b/modules/system/services/networkfs/default.nix
similarity index 82%
rename from system/services/misc/pc/default.nix
rename to modules/system/services/networkfs/default.nix
index 4e223a2..1681237 100644
--- a/system/services/misc/pc/default.nix
+++ b/modules/system/services/networkfs/default.nix
@@ -1,4 +1,5 @@
-{pkgs, ...}: {
+{ ... }:
+{
services = {
gvfs.enable = true;
udisks2.enable = true;
diff --git a/system/services/nginx/default.nix b/modules/system/services/nginx/default.nix
similarity index 98%
rename from system/services/nginx/default.nix
rename to modules/system/services/nginx/default.nix
index a0a71ce..c7df941 100644
--- a/system/services/nginx/default.nix
+++ b/modules/system/services/nginx/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
services.nginx = {
enable = true;
package = (pkgs.nginx.override {
diff --git a/modules/system/services/school/default.nix b/modules/system/services/school/default.nix
new file mode 100644
index 0000000..a124cad
--- /dev/null
+++ b/modules/system/services/school/default.nix
@@ -0,0 +1,4 @@
+{ ... }:
+{
+ services.globalprotect.enable = true;
+}
diff --git a/system/services/social/default.nix b/modules/system/services/social/default.nix
similarity index 89%
rename from system/services/social/default.nix
rename to modules/system/services/social/default.nix
index 724937c..7177cce 100644
--- a/system/services/social/default.nix
+++ b/modules/system/services/social/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./matrix
./mastodon
diff --git a/system/services/social/lemmy/default.nix b/modules/system/services/social/lemmy/default.nix
similarity index 96%
rename from system/services/social/lemmy/default.nix
rename to modules/system/services/social/lemmy/default.nix
index 9eec59b..abdc624 100644
--- a/system/services/social/lemmy/default.nix
+++ b/modules/system/services/social/lemmy/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
imports = [
./nginx
];
diff --git a/system/services/social/lemmy/nginx/default.nix b/modules/system/services/social/lemmy/nginx/default.nix
similarity index 86%
rename from system/services/social/lemmy/nginx/default.nix
rename to modules/system/services/social/lemmy/nginx/default.nix
index 34f156f..af9b4fc 100644
--- a/system/services/social/lemmy/nginx/default.nix
+++ b/modules/system/services/social/lemmy/nginx/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services.nginx.virtualHosts."lemmy.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/social/mastodon/default.nix b/modules/system/services/social/mastodon/default.nix
similarity index 95%
rename from system/services/social/mastodon/default.nix
rename to modules/system/services/social/mastodon/default.nix
index ac07cb8..a0dfede 100644
--- a/system/services/social/mastodon/default.nix
+++ b/modules/system/services/social/mastodon/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
services.mastodon = {
enable = true;
localDomain = "social.${outputs.secrets.jimDomain}";
diff --git a/system/services/social/matrix/default.nix b/modules/system/services/social/matrix/default.nix
similarity index 81%
rename from system/services/social/matrix/default.nix
rename to modules/system/services/social/matrix/default.nix
index c74c65d..daef3a9 100644
--- a/system/services/social/matrix/default.nix
+++ b/modules/system/services/social/matrix/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./synapse
./element
diff --git a/system/services/social/matrix/element/default.nix b/modules/system/services/social/matrix/element/default.nix
similarity index 96%
rename from system/services/social/matrix/element/default.nix
rename to modules/system/services/social/matrix/element/default.nix
index b9fc0c6..ddfefd5 100644
--- a/system/services/social/matrix/element/default.nix
+++ b/modules/system/services/social/matrix/element/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
imports = [
./nginx
];
diff --git a/system/services/social/matrix/element/nginx/default.nix b/modules/system/services/social/matrix/element/nginx/default.nix
similarity index 85%
rename from system/services/social/matrix/element/nginx/default.nix
rename to modules/system/services/social/matrix/element/nginx/default.nix
index 4dfe86a..3513952 100644
--- a/system/services/social/matrix/element/nginx/default.nix
+++ b/modules/system/services/social/matrix/element/nginx/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
services.nginx.virtualHosts."chat.${outputs.secrets.jimDomain}" = {
enableACME = true;
addSSL = true;
diff --git a/system/services/social/matrix/synapse/coturn/default.nix b/modules/system/services/social/matrix/synapse/coturn/default.nix
similarity index 97%
rename from system/services/social/matrix/synapse/coturn/default.nix
rename to modules/system/services/social/matrix/synapse/coturn/default.nix
index 729f844..f4fbb61 100644
--- a/system/services/social/matrix/synapse/coturn/default.nix
+++ b/modules/system/services/social/matrix/synapse/coturn/default.nix
@@ -1,4 +1,5 @@
-{ outputs, config, ... }: {
+{ outputs, config, ... }:
+{
services = {
coturn = {
enable = true;
diff --git a/system/services/social/matrix/synapse/coturn/nginx/default.nix b/modules/system/services/social/matrix/synapse/coturn/nginx/default.nix
similarity index 90%
rename from system/services/social/matrix/synapse/coturn/nginx/default.nix
rename to modules/system/services/social/matrix/synapse/coturn/nginx/default.nix
index 217d78b..1de57f9 100644
--- a/system/services/social/matrix/synapse/coturn/nginx/default.nix
+++ b/modules/system/services/social/matrix/synapse/coturn/nginx/default.nix
@@ -1,4 +1,5 @@
-{ outputs, config, ... }: {
+{ outputs, config, ... }:
+{
services.nginx.virtualHosts."turn.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/social/matrix/synapse/default.nix b/modules/system/services/social/matrix/synapse/default.nix
similarity index 98%
rename from system/services/social/matrix/synapse/default.nix
rename to modules/system/services/social/matrix/synapse/default.nix
index 6f1691e..b6251bb 100644
--- a/system/services/social/matrix/synapse/default.nix
+++ b/modules/system/services/social/matrix/synapse/default.nix
@@ -1,8 +1,9 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
imports = [
- ./nginx
./coturn
./slidingsync
+ ./nginx
];
services.matrix-synapse = {
diff --git a/system/services/social/matrix/synapse/nginx/default.nix b/modules/system/services/social/matrix/synapse/nginx/default.nix
similarity index 95%
rename from system/services/social/matrix/synapse/nginx/default.nix
rename to modules/system/services/social/matrix/synapse/nginx/default.nix
index f8141f6..e02f2e8 100644
--- a/system/services/social/matrix/synapse/nginx/default.nix
+++ b/modules/system/services/social/matrix/synapse/nginx/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services.nginx.virtualHosts."matrix.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/social/matrix/synapse/slidingsync/default.nix b/modules/system/services/social/matrix/synapse/slidingsync/default.nix
similarity index 92%
rename from system/services/social/matrix/synapse/slidingsync/default.nix
rename to modules/system/services/social/matrix/synapse/slidingsync/default.nix
index f33e561..81d161f 100644
--- a/system/services/social/matrix/synapse/slidingsync/default.nix
+++ b/modules/system/services/social/matrix/synapse/slidingsync/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
services.matrix-sliding-sync = {
enable = true;
settings = {
diff --git a/system/services/social/owncast/default.nix b/modules/system/services/social/owncast/default.nix
similarity index 87%
rename from system/services/social/owncast/default.nix
rename to modules/system/services/social/owncast/default.nix
index 3404df9..c4d2917 100644
--- a/system/services/social/owncast/default.nix
+++ b/modules/system/services/social/owncast/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
imports = [
./nginx
];
diff --git a/system/services/social/owncast/nginx/default.nix b/modules/system/services/social/owncast/nginx/default.nix
similarity index 91%
rename from system/services/social/owncast/nginx/default.nix
rename to modules/system/services/social/owncast/nginx/default.nix
index cfaf8a1..c13d460 100644
--- a/system/services/social/owncast/nginx/default.nix
+++ b/modules/system/services/social/owncast/nginx/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services.nginx.virtualHosts."live.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/social/pixelfed/default.nix b/modules/system/services/social/pixelfed/default.nix
similarity index 97%
rename from system/services/social/pixelfed/default.nix
rename to modules/system/services/social/pixelfed/default.nix
index 50ac38e..e7d1555 100644
--- a/system/services/social/pixelfed/default.nix
+++ b/modules/system/services/social/pixelfed/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
services.pixelfed = {
enable = true;
domain = "pics.${outputs.secrets.jimDomain}";
diff --git a/system/services/ssh/default.nix b/modules/system/services/ssh/default.nix
similarity index 95%
rename from system/services/ssh/default.nix
rename to modules/system/services/ssh/default.nix
index 589248a..03b5dc3 100644
--- a/system/services/ssh/default.nix
+++ b/modules/system/services/ssh/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./fail2ban
];
diff --git a/system/services/ssh/fail2ban/default.nix b/modules/system/services/ssh/fail2ban/default.nix
similarity index 87%
rename from system/services/ssh/fail2ban/default.nix
rename to modules/system/services/ssh/fail2ban/default.nix
index 00206d1..62d80a8 100644
--- a/system/services/ssh/fail2ban/default.nix
+++ b/modules/system/services/ssh/fail2ban/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services.fail2ban = {
enable = true;
maxretry = 5;
diff --git a/system/services/sunshine/default.nix b/modules/system/services/sunshine/default.nix
similarity index 90%
rename from system/services/sunshine/default.nix
rename to modules/system/services/sunshine/default.nix
index 053332c..e73dccb 100644
--- a/system/services/sunshine/default.nix
+++ b/modules/system/services/sunshine/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
services.sunshine = {
enable = true;
settings.port = 57989;
diff --git a/system/services/transmission/default.nix b/modules/system/services/transmission/default.nix
similarity index 91%
rename from system/services/transmission/default.nix
rename to modules/system/services/transmission/default.nix
index 8bd07a7..341a3d1 100644
--- a/system/services/transmission/default.nix
+++ b/modules/system/services/transmission/default.nix
@@ -1,4 +1,5 @@
-{ pkgs, outputs, ... }: {
+{ pkgs, outputs, ... }:
+{
imports = [
./nginx
];
diff --git a/system/services/transmission/nginx/default.nix b/modules/system/services/transmission/nginx/default.nix
similarity index 91%
rename from system/services/transmission/nginx/default.nix
rename to modules/system/services/transmission/nginx/default.nix
index 498005b..3a0e7bc 100644
--- a/system/services/transmission/nginx/default.nix
+++ b/modules/system/services/transmission/nginx/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services.nginx.virtualHosts."torrent.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/vaultwarden/default.nix b/modules/system/services/vaultwarden/default.nix
similarity index 97%
rename from system/services/vaultwarden/default.nix
rename to modules/system/services/vaultwarden/default.nix
index 705f0ef..2b27997 100644
--- a/system/services/vaultwarden/default.nix
+++ b/modules/system/services/vaultwarden/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
imports = [
./nginx
];
diff --git a/system/services/vaultwarden/nginx/default.nix b/modules/system/services/vaultwarden/nginx/default.nix
similarity index 91%
rename from system/services/vaultwarden/nginx/default.nix
rename to modules/system/services/vaultwarden/nginx/default.nix
index 35638f8..82a7902 100644
--- a/system/services/vaultwarden/nginx/default.nix
+++ b/modules/system/services/vaultwarden/nginx/default.nix
@@ -1,4 +1,5 @@
-{ outputs, ... }: {
+{ outputs, ... }:
+{
services.nginx.virtualHosts."warden.${outputs.secrets.jimDomain}" = {
enableACME = true;
forceSSL = true;
diff --git a/system/services/virtualization/default.nix b/modules/system/services/virtualization/default.nix
similarity index 55%
rename from system/services/virtualization/default.nix
rename to modules/system/services/virtualization/default.nix
index f17d95e..8f61253 100644
--- a/system/services/virtualization/default.nix
+++ b/modules/system/services/virtualization/default.nix
@@ -1,6 +1,6 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./qemu
- ./waydroid
];
}
diff --git a/system/services/virtualization/qemu/default.nix b/modules/system/services/virtualization/qemu/default.nix
similarity index 96%
rename from system/services/virtualization/qemu/default.nix
rename to modules/system/services/virtualization/qemu/default.nix
index 5daeb19..4b5db05 100644
--- a/system/services/virtualization/qemu/default.nix
+++ b/modules/system/services/virtualization/qemu/default.nix
@@ -1,4 +1,5 @@
-{ config, pkgs, ... }: {
+{ config, pkgs, ... }:
+{
virtualisation = {
libvirtd = {
enable = true;
diff --git a/modules/system/services/virtualization/waydroid/default.nix b/modules/system/services/virtualization/waydroid/default.nix
new file mode 100644
index 0000000..521a802
--- /dev/null
+++ b/modules/system/services/virtualization/waydroid/default.nix
@@ -0,0 +1,4 @@
+{ config, lib, ... }:
+{
+ virtualisation.waydroid.enable = true;
+}
diff --git a/overlays/mpv/default.nix b/overlays/mpv/default.nix
new file mode 100644
index 0000000..306914a
--- /dev/null
+++ b/overlays/mpv/default.nix
@@ -0,0 +1,10 @@
+{ ... }:
+self: super: {
+ mpv = super.mpv.override {
+ scripts = with self.mpvScripts; [
+ mpris
+ sponsorblock
+ thumbnail
+ ];
+ };
+}
diff --git a/packages/default.nix b/packages/default.nix
new file mode 100644
index 0000000..807297c
--- /dev/null
+++ b/packages/default.nix
@@ -0,0 +1,5 @@
+{ pkgs, ... }:
+{
+ xash3d = import ./xash3d { inherit pkgs; };
+ hlsdk = import ./hlsdk { inherit pkgs; };
+}
diff --git a/extras/pkgs/xash/hlsdk.nix b/packages/hlsdk/default.nix
similarity index 100%
rename from extras/pkgs/xash/hlsdk.nix
rename to packages/hlsdk/default.nix
diff --git a/extras/pkgs/xash/change-zip-date.patch b/packages/xash3d/change-zip-date.patch
similarity index 100%
rename from extras/pkgs/xash/change-zip-date.patch
rename to packages/xash3d/change-zip-date.patch
diff --git a/extras/pkgs/xash/xash3d.nix b/packages/xash3d/default.nix
similarity index 100%
rename from extras/pkgs/xash/xash3d.nix
rename to packages/xash3d/default.nix
diff --git a/system/modules/networking/wireless/default.nix b/system/modules/networking/wireless/default.nix
deleted file mode 100644
index 03e07cf..0000000
--- a/system/modules/networking/wireless/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ lib, config, ... }: {
- options = {
- networking.wifi.enable = lib.mkEnableOption "Enable enable Network Manager and B43";
- };
-
- config = lib.mkIf config.misc.general.enable {
- networking = {
- networkmanager.enable = true;
- enableB43Firmware = true;
- };
- };
-}
diff --git a/system/modules/overlays/default.nix b/system/modules/overlays/default.nix
deleted file mode 100644
index 2883425..0000000
--- a/system/modules/overlays/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ outputs, ... }: {
- nixpkgs.overlays = [
- outputs.overlays.additions
- outputs.overlays.selfsuper
- outputs.overlays.finalprev
- ];
-}
diff --git a/system/modules/video/nouveau/default.nix b/system/modules/video/nouveau/default.nix
deleted file mode 100644
index 3413d95..0000000
--- a/system/modules/video/nouveau/default.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ config, lib, ... }: {
- options = {
- drivers.nouveau.enable = lib.mkEnableOption "Enable proprietary Nvidia drivers";
- };
-
- config = lib.mkIf config.drivers.nvidia.enable {
- services.xserver.videoDrivers = [ "nouveau" ];
- };
-}
diff --git a/system/modules/video/nvidia/default.nix b/system/modules/video/nvidia/default.nix
deleted file mode 100644
index e8cc340..0000000
--- a/system/modules/video/nvidia/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ pkgs, config, lib, ... }: {
- options = {
- drivers.nvidia.enable = lib.mkEnableOption "Enable proprietary Nvidia drivers";
- };
-
- config = lib.mkIf config.drivers.nvidia.enable {
- services.xserver.videoDrivers = [ "nvidia" ];
- hardware.nvidia = {
- modesetting.enable = true;
- nvidiaSettings = false;
- package = config.boot.kernelPackages.nvidiaPackages.beta;
- open = false;
- };
- };
-}
diff --git a/system/pc.nix b/system/pc.nix
deleted file mode 100644
index 0b8568c..0000000
--- a/system/pc.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ ... }: {
- imports = [
- # Base configs
- ./default.nix
-
- # Users and groups
- ./accounts
-
- # Modules
- ./modules
-
- # Programs
- ./programs
-
- # Services
- ./services/ssh
- ./services/sunshine
- ./services/mpd
- ./services/virtualization
- ];
-}
diff --git a/system/programs/default.nix b/system/programs/default.nix
deleted file mode 100644
index 1f91e59..0000000
--- a/system/programs/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ ... }: {
- imports = [
- ./appimage
- ./gaming
- ./git
- ./school
- ./sway
- ./theming
- ./wayland
- ];
-}
diff --git a/system/programs/school/default.nix b/system/programs/school/default.nix
deleted file mode 100644
index b717b22..0000000
--- a/system/programs/school/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ pkgs, ... }: {
- environment.systemPackages = with pkgs; [
- remmina
- freerdp
- python3
- zoom-us
- globalprotect-openconnect
- ];
-
- services.globalprotect.enable = true;
-}
diff --git a/system/programs/theming/default.nix b/system/programs/theming/default.nix
deleted file mode 100644
index 7727fb3..0000000
--- a/system/programs/theming/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ ... }: {
- imports = [
- ./qt
- ./fonts
- ];
-}
diff --git a/system/programs/wayland/default.nix b/system/programs/wayland/default.nix
deleted file mode 100644
index f3fc805..0000000
--- a/system/programs/wayland/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ pkgs, ... }: {
- programs = {
- dconf.enable = true;
- light.enable = true;
- xwayland.enable = true;
- };
-
- # Battery saver and dbus
- services = {
- tlp.enable = true;
- dbus.enable = true;
- };
-
- environment.systemPackages = with pkgs; [
- wl-clipboard
- wdisplays
- clipman
- libnotify
- grim
- slurp
- swappy
- jq
- lm_sensors
- ];
-}
diff --git a/system/server.nix b/system/server.nix
deleted file mode 100644
index 3623eef..0000000
--- a/system/server.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ ... }: {
- imports = [
- # Base configs
- ./default.nix
-
- # Users and groups
- ./accounts
-
- # Modules
- ./modules/security/doas
-
- # Services
- ./services/acme
- ./services/ddclient
- ./services/fileserver
- ./services/firewall/server
- ./services/forgejo
- ./services/icecast
- ./services/mailserver
- ./services/minecraft
- ./services/misc/server
- ./services/mysql
- ./services/nginx
- ./services/social
- ./services/ssh
- ./services/transmission
- ./services/vaultwarden
- ./services/wireguard/server
- ];
-
- environment.systemPackages = with pkgs; [
- mdadm
- ];
-}
diff --git a/system/services/firewall/pc/default.nix b/system/services/firewall/pc/default.nix
deleted file mode 100644
index 0bb9218..0000000
--- a/system/services/firewall/pc/default.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{outputs, ...}: {
- # Networking settings
- networking = {
- # Enable firewall
- firewall = {
- allowPing = false;
- extraInputRules = ''
- ip saddr { ${outputs.ips.server}, ${outputs.ips.wgSpan}.1 } accept comment "Accept Server"
- '';
- };
- };
-}
diff --git a/system/services/garbage-collection/default.nix b/system/services/garbage-collection/default.nix
deleted file mode 100644
index c06c2d9..0000000
--- a/system/services/garbage-collection/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ ... }: {
- nix.gc = {
- automatic = true;
- dates = "weekly";
- options = "--delete-older-than 1w";
- };
-}
diff --git a/system/services/virtualization/waydroid/default.nix b/system/services/virtualization/waydroid/default.nix
deleted file mode 100644
index 0751a8e..0000000
--- a/system/services/virtualization/waydroid/default.nix
+++ /dev/null
@@ -1,9 +0,0 @@
-{ config, lib, ... }: {
- options = {
- misc.waydroid.enable = lib.mkEnableOption "Enable proprietary Nvidia drivers";
- };
-
- config = lib.mkIf config.misc.waydroid.enable {
- virtualisation.waydroid.enable = true;
- };
-}
diff --git a/extras/cmd.nix b/variables/cmd/default.nix
similarity index 82%
rename from extras/cmd.nix
rename to variables/cmd/default.nix
index 9396002..ecf0886 100644
--- a/extras/cmd.nix
+++ b/variables/cmd/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
auth = "doas";
nixcfg = "ranger /etc/nixos";
}
diff --git a/extras/displays.nix b/variables/displays/default.nix
similarity index 85%
rename from extras/displays.nix
rename to variables/displays/default.nix
index 2322b16..81b6d5c 100644
--- a/extras/displays.nix
+++ b/variables/displays/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
d1 = "DP-3";
d2 = "DP-1";
d3 = "DP-2";
diff --git a/extras/ips.nix b/variables/ips/default.nix
similarity index 92%
rename from extras/ips.nix
rename to variables/ips/default.nix
index 89356b2..5021a8e 100644
--- a/extras/ips.nix
+++ b/variables/ips/default.nix
@@ -1,4 +1,5 @@
-{ ... }: rec {
+{ ... }:
+rec {
netInt = "eno1";
localSpan = "10.0.0";
server = "${localSpan}.2";
diff --git a/extras/look.nix b/variables/look/default.nix
similarity index 97%
rename from extras/look.nix
rename to variables/look/default.nix
index 5ff11c4..3a65b4b 100644
--- a/extras/look.nix
+++ b/variables/look/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
colors = {
prime = ''3823C4''; #3823C4
accent = ''1B1F59''; #1B1F59
diff --git a/variables/secrets_/default.nix b/variables/secrets_/default.nix
new file mode 100644
index 0000000..17768ac
Binary files /dev/null and b/variables/secrets_/default.nix differ
diff --git a/extras/workspaces.nix b/variables/workspaces/default.nix
similarity index 96%
rename from extras/workspaces.nix
rename to variables/workspaces/default.nix
index 8df530a..8cd36cf 100644
--- a/extras/workspaces.nix
+++ b/variables/workspaces/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
w0 = ''0:0'';
w1 = ''1:1'';
w2 = ''2:2'';