commit 97a1698b47118c85e8942b0600a6535e669e2837
parent 21d8827e2713e2e58d42e45a6fab6a63b7ebc6ae
Author: Katja (ctucx) <git@ctu.cx>
Date: Sun, 2 Mar 2025 15:51:41 +0100
parent 21d8827e2713e2e58d42e45a6fab6a63b7ebc6ae
Author: Katja (ctucx) <git@ctu.cx>
Date: Sun, 2 Mar 2025 15:51:41 +0100
flake: use camel-case, move module imports to `modules/default.nix`
8 files changed, 139 insertions(+), 144 deletions(-)
diff --git a/configurations/common/default.nix b/configurations/common/default.nix @@ -9,15 +9,11 @@ in { [ ../../modules ./programs - inputs.lix-module.nixosModules.default ] (if (currentSystem == "x86_64-linux") then [ - inputs.home-manager.nixosModules.home-manager - inputs.lanzaboote.nixosModules.lanzaboote ../linux ] else []) (if (currentSystem == "aarch64-darwin") || (currentSystem == "x86_64-darwin") then [ - inputs.home-manager.darwinModules.home-manager ../darwin ] else []) ]);
diff --git a/configurations/linux/gnome.nix b/configurations/linux/gnome.nix @@ -1,4 +1,4 @@ -{ inputs, config, lib, pkgs, home-manager, ... }: +{ inputs, config, lib, pkgs, homeManager, ... }: { @@ -103,7 +103,7 @@ }; # Use `dconf watch /` to track stateful changes you are doing and store them here. - dconf.settings = with inputs.home-manager.lib.hm.gvariant; let + dconf.settings = with inputs.homeManager.lib.hm.gvariant; let numWorkspaces = 7; workspaces = lib.lists.reverseList( pkgs.std.list.unfold( n: if n == 0 then pkgs.std.optional.nothing else pkgs.std.optional.just( pkgs.std.tuple.tuple2 n (n - 1))) numWorkspaces); in {
diff --git a/flake.lock b/flake.lock @@ -84,10 +84,10 @@ "type": "github" } }, - "ctucx-gallery": { + "ctucxGallery": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -107,10 +107,10 @@ "url": "https://git.ctu.cx/gallery" } }, - "ctucx-things": { + "ctucxThings": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -130,10 +130,10 @@ "url": "https://git.ctu.cx/ctucx.things" } }, - "ctucx-website": { + "ctucxWebsite": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -175,27 +175,7 @@ "type": "github" } }, - "darwin_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1740755725, - "narHash": "sha256-amZbqP84H/ApugaT+TADXTB3NbjkVHI9Vac1saIk0kE=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "5d6e0851b60508cffd66b4a6982440a40720338d", - "type": "github" - }, - "original": { - "owner": "lnl7", - "repo": "nix-darwin", - "type": "github" - } - }, - "dns-nix": { + "dnsNix": { "inputs": { "flake-utils": "flake-utils_2", "nixpkgs": [ @@ -317,14 +297,14 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -333,16 +313,16 @@ "type": "github" } }, - "flake-utils_4": { + "flakeUtils": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -366,10 +346,10 @@ "type": "github" } }, - "flauschehorn-sexy": { + "flauschehornSexy": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -411,10 +391,10 @@ "type": "github" } }, - "gpx-map": { + "gpxMap": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -455,7 +435,7 @@ "type": "github" } }, - "home-manager_2": { + "homeManager": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -496,7 +476,7 @@ "crane": "crane", "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ], @@ -532,10 +512,10 @@ "url": "https://git.lix.systems/lix-project/lix/archive/2.91.1.tar.gz" } }, - "lix-module": { + "lixModule": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "flakey-profile": "flakey-profile", "lix": "lix", @@ -555,10 +535,10 @@ "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz" } }, - "mobile-coverage-map": { + "mobileCoverageMap": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -578,10 +558,10 @@ "url": "https://git.ctu.cx/mobile-coverage-map" } }, - "mqtt-webui": { + "mqttWebUI": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -622,7 +602,27 @@ "type": "github" } }, - "nix-std": { + "nixDarwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1740755725, + "narHash": "sha256-amZbqP84H/ApugaT+TADXTB3NbjkVHI9Vac1saIk0kE=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "5d6e0851b60508cffd66b4a6982440a40720338d", + "type": "github" + }, + "original": { + "owner": "lnl7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixStd": { "locked": { "lastModified": 1710870712, "narHash": "sha256-e+7MJF2gsgTBuOWv4mCimSP0D9+naeFSw9a7N3yEmv4=", @@ -637,7 +637,7 @@ "type": "github" } }, - "nixos-hardware": { + "nixosHardware": { "locked": { "lastModified": 1740646007, "narHash": "sha256-dMReDQobS3kqoiUCQIYI9c0imPXRZnBubX20yX/G5LE=", @@ -763,26 +763,26 @@ "inputs": { "agenix": "agenix", "colmena": "colmena", - "ctucx-gallery": "ctucx-gallery", - "ctucx-things": "ctucx-things", - "ctucx-website": "ctucx-website", - "darwin": "darwin_2", - "dns-nix": "dns-nix", - "flake-utils": "flake-utils_3", - "flauschehorn-sexy": "flauschehorn-sexy", - "gpx-map": "gpx-map", - "home-manager": "home-manager_2", + "ctucxGallery": "ctucxGallery", + "ctucxThings": "ctucxThings", + "ctucxWebsite": "ctucxWebsite", + "dnsNix": "dnsNix", + "flakeUtils": "flakeUtils", + "flauschehornSexy": "flauschehornSexy", + "gpxMap": "gpxMap", + "homeManager": "homeManager", "impermanence": "impermanence", "lanzaboote": "lanzaboote", - "lix-module": "lix-module", - "mobile-coverage-map": "mobile-coverage-map", - "mqtt-webui": "mqtt-webui", - "nix-std": "nix-std", - "nixos-hardware": "nixos-hardware", + "lixModule": "lixModule", + "mobileCoverageMap": "mobileCoverageMap", + "mqttWebUI": "mqttWebUI", + "nixDarwin": "nixDarwin", + "nixStd": "nixStd", + "nixosHardware": "nixosHardware", "nixpkgs": "nixpkgs", "nixpkgsDarwin": "nixpkgsDarwin", "nixpkgsUnstable": "nixpkgsUnstable", - "simple-nixos-mailserver": "simple-nixos-mailserver", + "simpleNixosMailserver": "simpleNixosMailserver", "stagit": "stagit", "trainsearch": "trainsearch", "travelynx2fedi": "travelynx2fedi" @@ -813,7 +813,7 @@ "type": "github" } }, - "simple-nixos-mailserver": { + "simpleNixosMailserver": { "inputs": { "blobs": "blobs", "flake-compat": "flake-compat_3", @@ -856,7 +856,7 @@ "stagit": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -924,7 +924,7 @@ "trainsearch": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs" @@ -947,7 +947,7 @@ "travelynx2fedi": { "inputs": { "flake-utils": [ - "flake-utils" + "flakeUtils" ], "nixpkgs": [ "nixpkgs"
diff --git a/flake.nix b/flake.nix @@ -5,7 +5,7 @@ outputs = { self, ... } @ inputs: rec { darwinConfigurations = { - blechkasten = inputs.darwin.lib.darwinSystem rec { + blechkasten = inputs.nixDarwin.lib.darwinSystem rec { system = "aarch64-darwin"; pkgs = import inputs.nixpkgsDarwin { @@ -62,8 +62,8 @@ (import ./pkgs/overlay.nix) (final: prev: { - dns = inputs.dns-nix; - std = inputs.nix-std.lib; + dns = inputs.dnsNix; + std = inputs.nixStd.lib; unstable = inputs.nixpkgsUnstable.legacyPackages.${prev.system}; }) @@ -72,15 +72,14 @@ inputs.stagit.overlay inputs.travelynx2fedi.overlay - inputs.gpx-map.overlay - inputs.mobile-coverage-map.overlay - - inputs.mqtt-webui.overlay - inputs.ctucx-things.overlay - inputs.ctucx-gallery.overlay - inputs.ctucx-website.overlay + inputs.mqttWebUI.overlay + inputs.ctucxThings.overlay + inputs.ctucxGallery.overlay + inputs.ctucxWebsite.overlay inputs.trainsearch.overlay - inputs.flauschehorn-sexy.overlay + inputs.flauschehornSexy.overlay + inputs.gpxMap.overlay + inputs.mobileCoverageMap.overlay ]; }; @@ -90,13 +89,13 @@ nixpkgsDarwin.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin"; nixpkgsUnstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + nixosHardware.url = "github:NixOS/nixos-hardware/master"; - darwin.url = "github:lnl7/nix-darwin"; - darwin.inputs.nixpkgs.follows = "nixpkgs"; + nixDarwin.url = "github:lnl7/nix-darwin"; + nixDarwin.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.url = "github:nix-community/home-manager/release-24.11"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; + homeManager.url = "github:nix-community/home-manager/release-24.11"; + homeManager.inputs.nixpkgs.follows = "nixpkgs"; impermanence.url = "github:nix-community/impermanence"; @@ -106,61 +105,61 @@ lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1"; lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; - simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11"; - simple-nixos-mailserver.inputs.nixpkgs.follows = "nixpkgs"; + simpleNixosMailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.11"; + simpleNixosMailserver.inputs.nixpkgs.follows = "nixpkgs"; - lix-module.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz"; - lix-module.inputs.flake-utils.follows = "flake-utils"; - lix-module.inputs.nixpkgs.follows = "nixpkgs"; + lixModule.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz"; + lixModule.inputs.flake-utils.follows = "flakeUtils"; + lixModule.inputs.nixpkgs.follows = "nixpkgs"; colmena.url = "github:zhaofengli/colmena"; colmena.inputs.nixpkgs.follows = "nixpkgs"; - nix-std.url = "github:chessai/nix-std"; - flake-utils.url = "github:numtide/flake-utils"; + nixStd.url = "github:chessai/nix-std"; + flakeUtils.url = "github:numtide/flake-utils"; - dns-nix.url = "git+https://git.ctu.cx/dns.nix"; - dns-nix.inputs.nixpkgs.follows = "nixpkgs"; + dnsNix.url = "git+https://git.ctu.cx/dns.nix"; + dnsNix.inputs.nixpkgs.follows = "nixpkgs"; stagit.url = "git+https://git.ctu.cx/stagit"; stagit.inputs.nixpkgs.follows = "nixpkgs"; - stagit.inputs.flake-utils.follows = "flake-utils"; + stagit.inputs.flake-utils.follows = "flakeUtils"; - mqtt-webui.url = "git+https://git.ctu.cx/mqtt-webui"; - mqtt-webui.inputs.nixpkgs.follows = "nixpkgs"; - mqtt-webui.inputs.flake-utils.follows = "flake-utils"; + mqttWebUI.url = "git+https://git.ctu.cx/mqtt-webui"; + mqttWebUI.inputs.nixpkgs.follows = "nixpkgs"; + mqttWebUI.inputs.flake-utils.follows = "flakeUtils"; trainsearch.url = "git+https://git.ctu.cx/trainsearch"; trainsearch.inputs.nixpkgs.follows = "nixpkgs"; - trainsearch.inputs.flake-utils.follows = "flake-utils"; + trainsearch.inputs.flake-utils.follows = "flakeUtils"; - ctucx-website.url = "git+https://git.ctu.cx/website"; - ctucx-website.inputs.nixpkgs.follows = "nixpkgs"; - ctucx-website.inputs.flake-utils.follows = "flake-utils"; + ctucxWebsite.url = "git+https://git.ctu.cx/website"; + ctucxWebsite.inputs.nixpkgs.follows = "nixpkgs"; + ctucxWebsite.inputs.flake-utils.follows = "flakeUtils"; - ctucx-things.url = "git+https://git.ctu.cx/ctucx.things"; - ctucx-things.inputs.nixpkgs.follows = "nixpkgs"; - ctucx-things.inputs.flake-utils.follows = "flake-utils"; + ctucxThings.url = "git+https://git.ctu.cx/ctucx.things"; + ctucxThings.inputs.nixpkgs.follows = "nixpkgs"; + ctucxThings.inputs.flake-utils.follows = "flakeUtils"; - ctucx-gallery.url = "git+https://git.ctu.cx/gallery"; - ctucx-gallery.inputs.nixpkgs.follows = "nixpkgs"; - ctucx-gallery.inputs.flake-utils.follows = "flake-utils"; + ctucxGallery.url = "git+https://git.ctu.cx/gallery"; + ctucxGallery.inputs.nixpkgs.follows = "nixpkgs"; + ctucxGallery.inputs.flake-utils.follows = "flakeUtils"; - flauschehorn-sexy.url = "git+https://git.ctu.cx/flauschehorn.sexy"; - flauschehorn-sexy.inputs.nixpkgs.follows = "nixpkgs"; - flauschehorn-sexy.inputs.flake-utils.follows = "flake-utils"; + flauschehornSexy.url = "git+https://git.ctu.cx/flauschehorn.sexy"; + flauschehornSexy.inputs.nixpkgs.follows = "nixpkgs"; + flauschehornSexy.inputs.flake-utils.follows = "flakeUtils"; - mobile-coverage-map.url = "git+https://git.ctu.cx/mobile-coverage-map"; - mobile-coverage-map.inputs.nixpkgs.follows = "nixpkgs"; - mobile-coverage-map.inputs.flake-utils.follows = "flake-utils"; + mobileCoverageMap.url = "git+https://git.ctu.cx/mobile-coverage-map"; + mobileCoverageMap.inputs.nixpkgs.follows = "nixpkgs"; + mobileCoverageMap.inputs.flake-utils.follows = "flakeUtils"; - gpx-map.url = "git+https://git.ctu.cx/gpx-map"; - gpx-map.inputs.nixpkgs.follows = "nixpkgs"; - gpx-map.inputs.flake-utils.follows = "flake-utils"; + gpxMap.url = "git+https://git.ctu.cx/gpx-map"; + gpxMap.inputs.nixpkgs.follows = "nixpkgs"; + gpxMap.inputs.flake-utils.follows = "flakeUtils"; travelynx2fedi.url = "git+https://git.ctu.cx/travelynx2fedi"; travelynx2fedi.inputs.nixpkgs.follows = "nixpkgs"; - travelynx2fedi.inputs.flake-utils.follows = "flake-utils"; + travelynx2fedi.inputs.flake-utils.follows = "flakeUtils"; }; }
diff --git a/machines/briefkasten/impermanence.nix b/machines/briefkasten/impermanence.nix @@ -2,10 +2,6 @@ { - imports = [ - inputs.impermanence.nixosModules.impermanence - ]; - services.syncthing = { dataDir = "/nix/persist/home/katja/syncthing"; configDir = "/nix/persist/home/katja/.config/syncthing"; @@ -39,7 +35,7 @@ home-manager.users.katja = { imports = [ - inputs.impermanence.nixosModules.home-manager.impermanence + inputs.impermanence.homeManagerModules.default ]; home.persistence."/nix/persist/home/katja" = {
diff --git a/machines/hector/mail/default.nix b/machines/hector/mail/default.nix @@ -28,10 +28,6 @@ let in { - imports = [ - inputs.simple-nixos-mailserver.nixosModule - ]; - age.secrets.restic-mail.file = ./. + "/../../../secrets/${config.networking.hostName}/restic/mail.age"; age.secrets.mail-password-katja.file = ./. + "/../../../secrets/${config.networking.hostName}/mail/password-katja-ctu.cx.age"; age.secrets.mail-password-gts.file = ./. + "/../../../secrets/${config.networking.hostName}/mail/password-gts-ctu.cx.age";
diff --git a/machines/hector/websites/things.ctu.cx.nix b/machines/hector/websites/things.ctu.cx.nix @@ -2,10 +2,6 @@ { - imports = [ - inputs.ctucx-things.nixosModule - ]; - dns.zones."ctu.cx".subdomains."things".CNAME = [ "${config.networking.fqdn}." ]; age.secrets.restic-ctucx-things.file = ./. + "/../../../secrets/${config.networking.hostName}/restic/ctucx-things.age";
diff --git a/modules/default.nix b/modules/default.nix @@ -9,16 +9,28 @@ ]; imports = (builtins.concatLists [ + [ + inputs.lixModule.nixosModules.default + ] + (if (currentSystem == "x86_64-linux") then [ - inputs.agenix.nixosModules.default - ./linux/restic-backups.nix - ./linux/vnstati - ./linux/gitolite.nix - ./linux/email-notify.nix - ./linux/dns.nix - ./linux/gotosocial.nix + inputs.impermanence.nixosModules.default + inputs.homeManager.nixosModules.default + inputs.agenix.nixosModules.default + inputs.lanzaboote.nixosModules.lanzaboote + inputs.simpleNixosMailserver.nixosModules.default + inputs.ctucxThings.nixosModule + + ./linux/restic-backups.nix + ./linux/vnstati + ./linux/gitolite.nix + ./linux/email-notify.nix + ./linux/dns.nix + ./linux/gotosocial.nix ] else []) + (if (currentSystem == "aarch64-darwin") then [ + inputs.homeManager.darwinModules.default inputs.agenix.darwinModules.default ./darwin/quirks.nix ./darwin/hidutil.nix