refactor: biggest cleanup of my life

This commit is contained in:
leonhard committed 2026-02-19 16:29:24 +01:00
1 parent 94dc0e0927
commit c15e65fece
35 files changed
+104 -260

No files matched your search

Generated
+18 -122
View File
@@ -8,11 +8,11 @@
]
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"lastModified": 1769996383,
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
"type": "github"
},
"original": {
@@ -21,24 +21,6 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -46,71 +28,26 @@
]
},
"locked": {
"lastModified": 1770260404,
"narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=",
"lastModified": 1771471179,
"narHash": "sha256-XuP8HPzvt4+m9aKVeL9GdGNlTeyeDn3zEeUuorvrw88=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b",
"rev": "2dedeb55b2c140d9a123ae931588e8903fe202ef",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1754860581,
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.1.1",
"repo": "ixx",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1770770419,
"narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=",
"lastModified": 1771369470,
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1770841267,
"narHash": "sha256-9xejG0KoqsoKEGp2kVbXRlEYtFFcDTHjidiuX8hGO44=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ec7c70d12ce2fc37cb92aff673dcdca89d187bae",
"rev": "0182a361324364ae3f436a63005877674cf45efb",
"type": "github"
},
"original": {
@@ -126,52 +63,26 @@
"nixpkgs": [
"nixpkgs"
],
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_2"
"systems": "systems"
},
"locked": {
"lastModified": 1769049374,
"narHash": "sha256-h0Os2qqNyycDY1FyZgtbn28VF1ySP74/n0f+LDd8j+w=",
"lastModified": 1771135771,
"narHash": "sha256-wyvBIhDuyCRyjB3yPg77qoyxrlgQtBR1rVW3c9knV3E=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "b8f76bf5751835647538ef8784e4e6ee8deb8f95",
"rev": "ed0424f0b08d303a7348f52f7850ad1b2704f9ba",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-25.11",
"repo": "nixvim",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768249818,
"narHash": "sha256-ANfn5OqIxq3HONPIXZ6zuI5sLzX1sS+2qcf/Pa0kQEc=",
"owner": "NuschtOS",
"repo": "search",
"rev": "b6f77b88e9009bfde28e2130e218e5123dc66796",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"sops-nix": "sops-nix"
}
@@ -183,15 +94,15 @@
]
},
"locked": {
"lastModified": 1770683991,
"narHash": "sha256-xVfPvXDf9QN3Eh9dV+Lw6IkWG42KSuQ1u2260HKvpnc=",
"owner": "Mic92",
"lastModified": 1771166946,
"narHash": "sha256-UFc4lfGBr+wJmwgDGJDn1cVD6DTr0/8TdronNUiyXlU=",
"owner": "mic92",
"repo": "sops-nix",
"rev": "8b89f44c2cc4581e402111d928869fe7ba9f7033",
"rev": "2d0cf89b4404529778bc82de7e42b5754e0fe4fa",
"type": "github"
},
"original": {
"owner": "Mic92",
"owner": "mic92",
"repo": "sops-nix",
"type": "github"
}
@@ -210,21 +121,6 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
+43 -23
View File
@@ -1,16 +1,20 @@
{
description = "leonhard's nix config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-25.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixvim.url = "github:nix-community/nixvim/nixos-25.11";
nixvim.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@@ -18,18 +22,41 @@
self,
nixpkgs,
home-manager,
sops-nix,
nixvim,
...
}@inputs:
let
inherit (self) outputs;
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
commonModules = [ ./options.nix ];
homeImports = [
./options.nix
nixvim.homeModules.nixvim
./home-manager/base
];
mkNixosConfig = name: modules: {
"${name}" = nixpkgs.lib.nixosSystem {
modules = modules ++ commonModules;
modules = modules ++ [
./nixos/base
./options.nix
home-manager.nixosModules.home-manager
sops-nix.nixosModules.sops
{
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs outputs; };
users.leonhard.imports = homeImports ++ [
./home-manager/leonhard
];
};
}
];
specialArgs = { inherit inputs outputs; };
};
};
@@ -37,22 +64,15 @@
mkHomeConfig = name: modules: {
"${name}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = modules ++ commonModules;
modules = modules ++ homeImports;
extraSpecialArgs = { inherit inputs outputs; };
};
};
in
{
packages = import ./pkgs pkgs;
overlays = import ./overlays { inherit inputs; };
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
nixosConfigurations =
(mkNixosConfig "desktop" [ ./nixos/desktop ]) // (mkNixosConfig "server" [ ./nixos/server ]);
homeConfigurations =
(mkHomeConfig "leonhard@desktop" [ ./home-manager/desktop/leonhard.nix ])
// (mkHomeConfig "leonhard@server" [ ./home-manager/server/leonhard.nix ]);
homeConfigurations = mkHomeConfig "leonhard" [ ./home-manager/leonhard ];
};
}
-30
View File
@@ -1,30 +0,0 @@
{
inputs,
outputs,
}:
{
imports = [
outputs.homeManagerModules
inputs.nixvim.homeModules.nixvim
];
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
programs.home-manager.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.11";
}
+28
View File
@@ -0,0 +1,28 @@
{
osConfig ? null,
lib,
...
}:
let
mkDefaultSharedAttrs = defaults: lib.mapAttrs (_: v: lib.mkDefault v) defaults;
in
{
imports = [
./git.nix
./fish.nix
./nixvim
./hyprland.nix
./kitty.nix
./rofi
];
kekleo = lib.mkIf (osConfig != null) (mkDefaultSharedAttrs (osConfig.kekleo or { }));
programs.home-manager.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.11";
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-15
View File
@@ -1,15 +0,0 @@
{
inputs,
outputs,
...
}:
{
imports = [
(import ../base.nix { inherit inputs outputs; })
];
home = {
username = "leonhard";
homeDirectory = "/home/leonhard";
};
}
+6
View File
@@ -0,0 +1,6 @@
{
home = {
username = "leonhard";
homeDirectory = "/home/leonhard";
};
}
-16
View File
@@ -1,16 +0,0 @@
{
inputs,
outputs,
...
}:
{
imports = [
(import ../base.nix { inherit inputs outputs; })
../../nixos/server/config.nix
];
home = {
username = "leonhard";
homeDirectory = "/home/leonhard";
};
}
-10
View File
@@ -1,10 +0,0 @@
{
imports = [
./git.nix
./fish.nix
./nixvim
./hyprland.nix
./kitty.nix
./rofi
];
}
-8
View File
@@ -1,8 +0,0 @@
{
imports = [
./fish.nix
./firefox.nix
./hyprland.nix
./ly.nix
];
}
+4 -19
View File
@@ -1,41 +1,26 @@
{
inputs,
outputs,
}:
{
lib,
config,
pkgs,
...
}:
{
imports = [
outputs.nixosModules
./fish.nix
./firefox.nix
./hyprland.nix
./ly.nix
];
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in
{
settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Opinionated: disable global registry
flake-registry = "";
# Workaround for https://github.com/NixOS/nix/issues/9574
nix-path = config.nix.nixPath;
};
# Opinionated: disable channels
channel.enable = false;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
-6
View File
@@ -1,11 +1,5 @@
{
inputs,
outputs,
...
}:
{
imports = [
(import ../base.nix { inherit inputs outputs; })
./hardware-configuration.nix
];
-6
View File
@@ -1,6 +0,0 @@
{
kekleo.graphical = false;
kekleo.publicKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOsLFjdS9JEcgBPa6NvOzpJp8coJPJwJFuM+PQCZ8brl leonhard"
];
}
+5 -5
View File
@@ -1,19 +1,19 @@
{
inputs,
outputs,
config,
...
}:
{
imports = [
(import ../base.nix { inherit inputs outputs; })
./hardware-configuration.nix
./config.nix
inputs.sops-nix.nixosModules.sops
./secrets
./dyndns
];
kekleo.graphical = false;
kekleo.publicKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOsLFjdS9JEcgBPa6NvOzpJp8coJPJwJFuM+PQCZ8brl leonhard"
];
users.users.leonhard = {
initialPassword = "leonhard";
isNormalUser = true;