BREAKING-CHANGE: modified structure, hm is now standalone

This commit is contained in:
2025-01-05 19:49:53 +01:00
parent e0d676b63d
commit 4aab349158
23 changed files with 586 additions and 322 deletions

191
flake.lock generated
View File

@@ -107,11 +107,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1735566338, "lastModified": 1735943654,
"narHash": "sha256-9sYGJZCGeb11WBVsE2u0gwuTk8LpbOgnrJvyDbHpOoY=", "narHash": "sha256-rXmcRRQfXXYAKOa5IXlrMISTwgScA2Dx04JpONXRA+Q=",
"owner": "chaotic-cx", "owner": "chaotic-cx",
"repo": "nyx", "repo": "nyx",
"rev": "446ad45313df3dbc93ad9e9d8dd6d094b16f6fb4", "rev": "5edcf7fb24c73ff9665f299461af33fa6171836f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -368,6 +368,37 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks": {
"inputs": {
"flake-compat": [
"stylix",
"flake-compat"
],
"gitignore": "gitignore_2",
"nixpkgs": [
"stylix",
"nixpkgs"
],
"nixpkgs-stable": [
"stylix",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731363552,
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -390,6 +421,28 @@
"type": "github" "type": "github"
} }
}, },
"gitignore_2": {
"inputs": {
"nixpkgs": [
"stylix",
"git-hooks",
"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"
}
},
"gnome-shell": { "gnome-shell": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -415,11 +468,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1734622215, "lastModified": 1735774425,
"narHash": "sha256-OOfI0XhSJGHblfdNDhfnn8QnZxng63rWk9eeJ2tCbiI=", "narHash": "sha256-C73gLFnEh8ZI0uDijUgCDWCd21T6I6tsaWgIBHcfAXg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1395379a7a36e40f2a76e7b9936cc52950baa1be", "rev": "5f6aa268e419d053c3d5025da740e390b12ac936",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -435,15 +488,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735381016, "lastModified": 1735344290,
"narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=", "narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2", "rev": "613691f285dad87694c2ba1c9e6298d04736292d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@@ -456,11 +510,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733085484, "lastModified": 1735774425,
"narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=", "narHash": "sha256-C73gLFnEh8ZI0uDijUgCDWCd21T6I6tsaWgIBHcfAXg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163", "rev": "5f6aa268e419d053c3d5025da740e390b12ac936",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -543,11 +597,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1735585949, "lastModified": 1736008833,
"narHash": "sha256-vCGG4tGMvzCzz+ZIsiNtpoFW9+f+itYLTAVW41qk/Hk=", "narHash": "sha256-3OvlurfefGSjT4E+qRvQNmqqRVlbHN8ifZy5C3uUZM8=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "1989b0049f7fb714a2417dfb14d6b4f3d2a079d3", "rev": "b0bae15499ad57bbfeae8be958df8c022201e583",
"revCount": 5607, "revCount": 5628,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://github.com/hyprwm/Hyprland" "url": "https://github.com/hyprwm/Hyprland"
@@ -575,11 +629,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735295819, "lastModified": 1735838245,
"narHash": "sha256-iHDDF1kj+wX7fHGTgKaM6rli6+O8mVFNmpypo+SgnNs=", "narHash": "sha256-dA2s+KFo6+TmYtQoXWfxQ8XukN6JQ0I0VoraG9zD7/I=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-plugins", "repo": "hyprland-plugins",
"rev": "a41bcdccac7d3fe220b3a8519633f0a812da3439", "rev": "920af33577a889772e96a067130252df5674ca8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -600,11 +654,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1728345020, "lastModified": 1735734474,
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=", "narHash": "sha256-9OV4lOqrEJVLdOrpNN/9msNwAhI6FQTu4N7fufilG08=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "a7c183800e74f337753de186522b9017a07a8cee", "rev": "271df559dd30e4bc5ec6af02d017ac0aaabd63a7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -703,11 +757,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1734125519, "lastModified": 1735946714,
"narHash": "sha256-dK1Dozb/tI8Dyg9aBBUgNt7L/HTTxB807Kfoh/PWSCw=", "narHash": "sha256-1kcSHRLdp9wEZdrdfh4h3VNzHIupON9gf4FtqMz4+54=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprpolkitagent", "repo": "hyprpolkitagent",
"rev": "ae7c5be24c63b8a53d0d5f5344d821b5f48d3623", "rev": "08cab3a4d9277687562702ae2db56305f9165081",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -745,11 +799,11 @@
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1729184813, "lastModified": 1735826012,
"narHash": "sha256-ARrsIQPFCHWjVl9Sxh8tedIoEsvnV4nORaDmYCyK+kk=", "narHash": "sha256-F/Yfn43SisTV2AUErkXToaFCOwryMcmaiz4Tw3VSpSk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprsysteminfo", "repo": "hyprsysteminfo",
"rev": "8b271e2ba39a5a9299e4e7bb60245a71704f5a89", "rev": "3498fad4c4b9c161fd78896ef583f492c93c7859",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1055,11 +1109,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1735471104, "lastModified": 1735834308,
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "rev": "6df24922a1400241dae323af55f30e4318a6ca65",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1085,6 +1139,21 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": {
"locked": {
"lastModified": 1735834308,
"narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6df24922a1400241dae323af55f30e4318a6ca65",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_10": { "nixpkgs_10": {
"locked": { "locked": {
"lastModified": 1731139594, "lastModified": 1731139594,
@@ -1183,11 +1252,11 @@
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1735531152, "lastModified": 1735922141,
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", "narHash": "sha256-vk0xwGZSlvZ/596yxOtsk4gxsIx2VemzdjiU8zhjgWw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", "rev": "d29ab98cd4a70a387b8ceea3e930b3340d41ac5a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1198,11 +1267,11 @@
}, },
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1735471104, "lastModified": 1735834308,
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "rev": "6df24922a1400241dae323af55f30e4318a6ca65",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1235,11 +1304,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1735648437, "lastModified": 1736095314,
"narHash": "sha256-cVc5Bn/oznCvRFDpCZEpQVo3FmpgQKGZEZ5RW4xvRu8=", "narHash": "sha256-HEGbYi2QfGTcy2TsEy1gDsbXuA/IaN5d5IZj2XJfAys=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "1bb7310d7d1eeaa33d1d009ac493bc2b38acef40", "rev": "cef9be6b71dfda87045ee9a83be7fb96ee545133",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1284,13 +1353,13 @@
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nix-alien": "nix-alien", "nix-alien": "nix-alien",
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_7",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur", "nur": "nur",
"rosepine-kvantum": "rosepine-kvantum", "rosepine-kvantum": "rosepine-kvantum",
"rust-overlay": "rust-overlay_2", "rust-overlay": "rust-overlay_2",
"spicetify-nix": "spicetify-nix", "spicetify-nix": "spicetify-nix",
"split-monitor-workspaces": "split-monitor-workspaces", "split-monitor-workspaces": "split-monitor-workspaces",
"stylix": "stylix", "stylix": "stylix",
"unstable": "unstable",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
}, },
@@ -1345,11 +1414,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735612067, "lastModified": 1736044260,
"narHash": "sha256-rsjojgfPUf9tWuMXuuo2KAIoUZ49XGZQJSjFGOO8Cq4=", "narHash": "sha256-DTAr0mAd8AZwWgRtU9ZZFPz3DwNeoH/Oi/1QMSqc9YQ=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "d199142e84bfaae476ffb4e09a70879d7918784d", "rev": "c8ed24cc104ebbc218d992e208131e9f024b69f0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1366,11 +1435,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1735618543, "lastModified": 1736050526,
"narHash": "sha256-Aqhp0PcsoEn4FRWZYJZHbHeB+FOJDQcbsaEsXv0iA9k=", "narHash": "sha256-wscvKDsyIES59ltENnOw7Hz8WKU8hg5m7dYbcJN2u6A=",
"owner": "Gerg-L", "owner": "Gerg-L",
"repo": "spicetify-nix", "repo": "spicetify-nix",
"rev": "2da20133b52ac69a1f348c08dc801c8638261548", "rev": "78c9ace8b9e1d7b64b4d797a066047c2332d24f6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1387,11 +1456,11 @@
"nix-filter": "nix-filter_2" "nix-filter": "nix-filter_2"
}, },
"locked": { "locked": {
"lastModified": 1734644214, "lastModified": 1735854954,
"narHash": "sha256-alZJZJn5cmxNGtKZcsKzOnnTtYpcvZjqSZ48Ep7ST5Q=", "narHash": "sha256-jW65EsiA0oxt7ZilCMXU8xRSaHxEaXdin9vc/9OX4U0=",
"owner": "Duckonaut", "owner": "Duckonaut",
"repo": "split-monitor-workspaces", "repo": "split-monitor-workspaces",
"rev": "88dffb38b01c712f80fe431f73859cd2210e718d", "rev": "c75ec3a643a98169acdea03336c06f3656fe0e76",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1408,6 +1477,7 @@
"base16-vim": "base16-vim", "base16-vim": "base16-vim",
"flake-compat": "flake-compat_5", "flake-compat": "flake-compat_5",
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_4",
"git-hooks": "git-hooks",
"gnome-shell": "gnome-shell", "gnome-shell": "gnome-shell",
"home-manager": "home-manager_3", "home-manager": "home-manager_3",
"nixpkgs": [ "nixpkgs": [
@@ -1419,11 +1489,11 @@
"tinted-tmux": "tinted-tmux" "tinted-tmux": "tinted-tmux"
}, },
"locked": { "locked": {
"lastModified": 1735524788, "lastModified": 1736011580,
"narHash": "sha256-R4i8VCdSGLWHt6cL5p2Cmlh9MRodZsYO8moUjvxYb54=", "narHash": "sha256-8gmk/i9ZA5C6LGRnqHb5sZ8UKaqT5GnS6XxeSPMSz+s=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "a4ed4168fb83289374f24cb8a039c6983637a076", "rev": "7dfcdb410118dcd02ba1d85a2179a6f1c877403f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1623,21 +1693,6 @@
"type": "github" "type": "github"
} }
}, },
"unstable": {
"locked": {
"lastModified": 1735471104,
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": [ "hyprland-protocols": [

View File

@@ -3,7 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixos-24.11"; nixpkgs.url = "nixpkgs/nixos-24.11";
unstable.url = "nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
nix-alien.url = "github:thiagokokada/nix-alien"; nix-alien.url = "github:thiagokokada/nix-alien";
@@ -42,7 +42,7 @@
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -60,7 +60,6 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
unstable,
home-manager, home-manager,
... ...
} @ inputs: let } @ inputs: let
@@ -75,43 +74,77 @@
in { in {
# Your custom packages # Your custom packages
# Accessible through 'nix build', 'nix shell', etc # Accessible through 'nix build', 'nix shell', etc
# packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
# Formatter for your nix files, available through 'nix fmt' # Formatter for your nix files, available through 'nix fmt'
# Other options beside 'alejandra' include 'nixpkgs-fmt' # Other options beside 'alejandra' include 'nixpkgs-fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Your custom packages and modifications, exported as overlays # Your custom packages and modifications, exported as overlays
overlays = import ./overlays {inherit inputs;}; overlays = import ./overlays {inherit inputs;};
# Reusable nixos modules you might want to export
# These are usually stuff you would upstream into nixpkgs
nixosModules = import ./modules/nixos;
# Reusable home-manager modules you might want to export
# These are usually stuff you would upstream into home-manager
homeManagerModules = import ./modules/home-manager;
# NixOS configuration entrypoint # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#hostname' # Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = { nixosConfigurations = {
zion = nixpkgs.lib.nixosSystem { zion = nixpkgs.lib.nixosSystem {
modules = [./hosts]; specialArgs = {inherit inputs outputs;};
specialArgs = { modules = [
inherit inputs outputs; # > Our main nixos configuration file <
username = "mike"; ./hosts/zion/configuration.nix
hostname = "zion"; ];
};
}; };
thor = nixpkgs.lib.nixosSystem { thor = nixpkgs.lib.nixosSystem {
modules = [./hosts]; specialArgs = {inherit inputs outputs;};
specialArgs = { modules = [
inherit inputs outputs; # > Our main nixos configuration file <
username = "mike"; ./hosts/thor/configuration.nix
hostname = "thor"; ];
};
}; };
server = nixpkgs.lib.nixosSystem { server = nixpkgs.lib.nixosSystem {
modules = [./hosts]; specialArgs = {inherit inputs outputs;};
specialArgs = { modules = [
inherit inputs outputs; # > Our main nixos configuration file <
username = "mike"; ./hosts/server/configuration.nix
hostname = "server"; ];
}; };
}; };
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
"mike@zion" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
# > Our main home-manager configuration file <
./home-manager/home.nix
];
};
"mike@thor" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
# > Our main home-manager configuration file <
./home-manager/home.nix
];
};
"mike@server" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {inherit inputs outputs;};
modules = [
# > Our main home-manager configuration file <
./home-manager/home.nix
];
};
}; };
}; };
} }

View File

@@ -1,7 +1,101 @@
{hostname, ...}: { # {
imports = # hostname,
if hostname == "zion" # inputs,
then [ # ...
# }: {
# imports =
# if hostname == "zion"
# then [
# ./programs/btop.nix
# ./programs/fastfetch.nix
# # ./programs/foot.nix
# ./programs/git.nix
# ./programs/gpg.nix
# ./programs/helix.nix
# ./programs/kitty.nix
# ./programs/neovide.nix
# ./programs/neovim.nix
# ./programs/packages.nix
# ./programs/shell.nix
# ./programs/tmux.nix
# ./programs/vscodium.nix
#
# ./dwm
# # ./programs/yazi.nix
# # ./programs/zathura.nix
#
# # ./configs/keys.nix
#
# ./system/dunst.nix
# ./system/hypr.nix
# ./system/hyprland.nix
# ./system/rofi.nix
# ./system/stylix.nix
# ./system/theme.nix
# ./system/waybar.nix
# ./system/wlsunset.nix
# ./system/wofi.nix
# ]
# else if hostname == "thor"
# then [
# ./programs/btop.nix
# ./programs/fastfetch.nix
# # ./programs/foot.nix
# ./programs/git.nix
# ./programs/gpg.nix
# ./programs/helix.nix
# ./programs/kitty.nix
# ./programs/neovide.nix
# ./programs/neovim.nix
# ./programs/packages.nix
# ./programs/shell.nix
# ./programs/tmux.nix
# ./programs/vscodium.nix
# # ./programs/yazi.nix
# # ./programs/zathura.nix
#
# # ./configs/keys.nix
#
# ./system/dunst.nix
# ./system/hyprland.nix
# ./system/rofi.nix
# ./system/stylix.nix
# ./system/theme.nix
# ./system/waybar.nix
# ./system/wlsunset.nix
# ./system/wofi.nix
# ]
# else if hostname == "server"
# then [
# ./programs/git.nix
# ./programs/btop.nix
# ./programs/yazi.nix
# ./programs/shell.nix
# ./programs/helix.nix
# ./programs/fastfetch.nix
# ]
# else [];
# }
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
# You can import other home-manager modules here
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
./programs/btop.nix ./programs/btop.nix
./programs/fastfetch.nix ./programs/fastfetch.nix
# ./programs/foot.nix # ./programs/foot.nix
@@ -23,52 +117,57 @@
# ./configs/keys.nix # ./configs/keys.nix
./system/dunst.nix ./system/dunst.nix
./system/hypr.nix # ./system/hypr.nix
./system/hyprland.nix # ./system/hyprland.nix
./system/rofi.nix ./system/rofi.nix
./system/stylix.nix # ./system/stylix.nix
./system/theme.nix ./system/theme.nix
./system/waybar.nix ./system/waybar.nix
./system/wlsunset.nix ./system/wlsunset.nix
./system/wofi.nix ./system/wofi.nix
] ];
else if hostname == "thor"
then [
./programs/btop.nix
./programs/fastfetch.nix
# ./programs/foot.nix
./programs/git.nix
./programs/gpg.nix
./programs/helix.nix
./programs/kitty.nix
./programs/neovide.nix
./programs/neovim.nix
./programs/packages.nix
./programs/shell.nix
./programs/tmux.nix
./programs/vscodium.nix
# ./programs/yazi.nix
# ./programs/zathura.nix
# ./configs/keys.nix nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
./system/dunst.nix # You can also add overlays exported from other flakes:
./system/hyprland.nix # neovim-nightly-overlay.overlays.default
./system/rofi.nix
./system/stylix.nix # Or define it inline, for example:
./system/theme.nix # (final: prev: {
./system/waybar.nix # hi = final.hello.overrideAttrs (oldAttrs: {
./system/wlsunset.nix # patches = [ ./change-hello-to-hi.patch ];
./system/wofi.nix # });
] # })
else if hostname == "server" ];
then [ # Configure your nixpkgs instance
./programs/git.nix config = {
./programs/btop.nix # Disable if you don't want unfree packages
./programs/yazi.nix allowUnfree = true;
./programs/shell.nix };
./programs/helix.nix };
./programs/fastfetch.nix
] home = {
else []; username = "mike";
homeDirectory = "/home/mike";
};
# Add stuff for your user as you see fit:
# programs.neovim.enable = true;
# home.packages = with pkgs; [ steam ];
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git.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 = "24.11";
} }

View File

@@ -51,7 +51,7 @@
# > desktop < # # > desktop < #
# firefox # firefox
whatsapp-for-linux # whatsapp-for-linux
telegram-desktop telegram-desktop
google-chrome google-chrome
chromium chromium

View File

@@ -1,82 +0,0 @@
{hostname, ...}: {
imports =
if hostname == "zion"
then [
./zion.nix
./modules/adb.nix
./modules/ananicy.nix
# ./modules/bluetooth.nix
./modules/boot.nix
./modules/configuration.nix
./modules/development.nix
./modules/fstrim.nix
./modules/gaming.nix
# ./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/remote-builder.nix
./modules/security.nix
./modules/ssh.nix
./modules/steam.nix
./modules/users.nix
./modules/vm.nix
./modules/xserver.nix
]
else if hostname == "thor"
then [
./thor.nix
./modules/adb.nix
./modules/ananicy.nix
./modules/bluetooth.nix
./modules/boot.nix
./modules/configuration.nix
./modules/development.nix
./modules/distributed-builds.nix
./modules/fstrim.nix
./modules/gaming.nix
./modules/greetd.nix
./modules/gsettings.nix
# ./modules/kde.nix
# ./modules/lanzaboot.nix
./modules/network.nix
./modules/nh.nix
# ./modules/nvidia.nix
./modules/ollama.nix
./modules/packages.nix
./modules/pipewire.nix
./modules/printing.nix
./modules/security.nix
./modules/ssh.nix
./modules/tlp.nix
./modules/users.nix
./modules/vm.nix
]
else if hostname == "server"
then [
./server.nix
./modules/nh.nix
./modules/tlp.nix
./modules/ssh.nix
./modules/boot.nix
./modules/users.nix
./modules/nvidia.nix
./modules/ollama.nix
./modules/fstrim.nix
./modules/system.nix
./modules/network.nix
./modules/configuration.nix
#./modules/lanzaboot.nix
]
else [];
}

View File

@@ -1,14 +1,8 @@
{ {
pkgs, pkgs,
hostname,
inputs, inputs,
... ...
}: { }: {
imports =
if hostname == "zion"
then [inputs.chaotic.nixosModules.default]
else [];
boot = { boot = {
tmp.cleanOnBoot = true; tmp.cleanOnBoot = true;
@@ -22,13 +16,6 @@
}; };
}; };
kernelPackages = kernelPackages = pkgs.linuxPackages_zen;
if hostname == "zion"
then pkgs.linuxPackages_zen #linuxPackages_zen #linuxPackages #linuxPackages_latest #linuxPackages_xanmod_latest
else if hostname == "thor"
then pkgs.linuxPackages
else if hostname == "server"
then pkgs.linuxPackages
else pkgs.linuxPackages_zen;
}; };
} }

View File

@@ -1,7 +1,9 @@
{ {
hostname, lib,
inputs, inputs,
outputs,
pkgs, pkgs,
config,
... ...
}: { }: {
time.timeZone = "Europe/Warsaw"; time.timeZone = "Europe/Warsaw";
@@ -33,10 +35,10 @@
libinput = { libinput = {
enable = true; enable = true;
mouse = { # mouse = {
accelProfile = "flat"; # accelProfile = "flat";
accelSpeed = "0.0"; # accelSpeed = "0.0";
}; # };
}; };
}; };
@@ -58,6 +60,24 @@
}; };
nixpkgs = { nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
config = { config = {
# I'm sorry Richard Stallman # I'm sorry Richard Stallman
allowUnfree = true; allowUnfree = true;
@@ -73,19 +93,27 @@
nixos.enable = true; nixos.enable = true;
}; };
nix = { nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {
daemonCPUSchedPolicy = "batch"; daemonCPUSchedPolicy = "batch";
channel.enable = false; channel.enable = false;
nixPath = ["nixpkgs=${inputs.nixpkgs}"]; # nixPath = ["nixpkgs=${inputs.nixpkgs}"];
optimise = { optimise = {
automatic = true; automatic = true;
dates = ["daily"]; dates = ["daily"];
}; };
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
settings = { settings = {
auto-optimise-store = true; auto-optimise-store = true;
experimental-features = ["nix-command" "flakes"]; experimental-features = ["nix-command" "flakes"];
flake-registry = "";
nix-path = config.nix.nixPath;
substituters = [ substituters = [
"https://cache.nixos.org" "https://cache.nixos.org"

View File

@@ -4,7 +4,7 @@
rust-overlay, rust-overlay,
... ...
}: { }: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs.unstable; [
# general # general
docker docker
docker-compose docker-compose
@@ -33,6 +33,7 @@
# # python # # python
# python311 # python311
# python311Packages.pip # python311Packages.pip
uv
# python311Packages.venvShellHook # python311Packages.venvShellHook
# cpp # cpp

View File

@@ -1,9 +1,5 @@
{ {pkgs, ...}: {
pkgs, users.users.mike.packages = with pkgs; [heroic];
username,
...
}: {
users.users.${username}.packages = with pkgs; [heroic];
hardware.steam-hardware.enable = true; hardware.steam-hardware.enable = true;
programs = { programs = {

View File

@@ -1,9 +1,8 @@
{hostname, ...}: { {
boot.initrd.systemd.network.wait-online.enable = false; boot.initrd.systemd.network.wait-online.enable = false;
systemd.services.NetworkManager-wait-online.enable = false; systemd.services.NetworkManager-wait-online.enable = false;
networking = { networking = {
hostName = "${hostname}";
firewall.enable = true; firewall.enable = true;
stevenblack = { stevenblack = {

View File

@@ -1,7 +1,7 @@
{username, ...}: { {
programs.nh = { programs.nh = {
enable = true; enable = true;
flake = "/home/${username}/.files"; flake = "/home/mike/.files";
clean = { clean = {
enable = true; enable = true;
dates = "weekly"; dates = "weekly";

View File

@@ -1,17 +1,15 @@
{ {
inputs, inputs,
username,
hostname,
pkgs, pkgs,
... ...
}: { }: {
imports = [inputs.home-manager.nixosModules.home-manager]; # imports = [inputs.home-manager.nixosModules.home-manager];
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
users.users.${username} = { users.users.mike = {
isNormalUser = true; isNormalUser = true;
description = "${username}"; description = "mike";
extraGroups = [ extraGroups = [
"networkmanager" "networkmanager"
"wheel" "wheel"
@@ -22,19 +20,19 @@
]; ];
}; };
home-manager = { # home-manager = {
useGlobalPkgs = true; # useGlobalPkgs = true;
useUserPackages = true; # useUserPackages = true;
extraSpecialArgs = {inherit inputs username hostname;}; # extraSpecialArgs = {inherit inputs username hostname;};
#
users.${username} = { # users.${username} = {
imports = [../../home-manager/home.nix]; # imports = [../../home-manager/home.nix];
programs.home-manager.enable = true; # programs.home-manager.enable = true;
home = { # home = {
stateVersion = "24.05"; # stateVersion = "24.05";
username = "${username}"; # username = "${username}";
homeDirectory = "/home/${username}"; # homeDirectory = "/home/${username}";
}; # };
}; # };
}; # };
} }

View File

@@ -1,9 +1,4 @@
{ {pkgs, ...}: {
pkgs,
username,
...
}: {
users.users.${username}.extraGroups = ["libvirtd"];
boot.kernel.sysctl = {"vm.max_map_count" = 2147483642;}; boot.kernel.sysctl = {"vm.max_map_count" = 2147483642;};
# Install necessary packages # Install necessary packages

View File

@@ -0,0 +1,43 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
../modules/common.nix
../modules/nh.nix
../modules/tlp.nix
../modules/ssh.nix
../modules/boot.nix
../modules/users.nix
../modules/nvidia.nix
../modules/ollama.nix
../modules/fstrim.nix
../modules/system.nix
../modules/network.nix
../modules/configuration.nix
#../modules/lanzaboot.nix
];
networking.hostName = "server";
}

View File

@@ -0,0 +1,56 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
../modules/common.nix
../modules/adb.nix
../modules/ananicy.nix
../modules/bluetooth.nix
../modules/boot.nix
../modules/configuration.nix
../modules/development.nix
../modules/distributed-builds.nix
../modules/fstrim.nix
../modules/gaming.nix
../modules/greetd.nix
../modules/gsettings.nix
# ../modules/kde.nix
# ../modules/lanzaboot.nix
../modules/network.nix
../modules/nh.nix
# ../modules/nvidia.nix
../modules/ollama.nix
../modules/packages.nix
../modules/pipewire.nix
../modules/printing.nix
../modules/security.nix
../modules/ssh.nix
../modules/tlp.nix
../modules/users.nix
../modules/vm.nix
];
networking.hostName = "thor";
}

View File

@@ -0,0 +1,57 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
../modules/common.nix
../modules/adb.nix
../modules/ananicy.nix
# ../modules/bluetooth.nix
../modules/boot.nix
../modules/common.nix
../modules/development.nix
../modules/fstrim.nix
../modules/gaming.nix
# ../modules/greetd.nix
../modules/gsettings.nix
# ../modules/kde.nix
# ../modules/lanzaboot.nix
../modules/network.nix
../modules/nh.nix
../modules/nvidia.nix
../modules/ollama.nix
../modules/packages.nix
../modules/pipewire.nix
../modules/printing.nix
../modules/remote-builder.nix
../modules/security.nix
../modules/ssh.nix
../modules/steam.nix
../modules/users.nix
../modules/vm.nix
../modules/xserver.nix
];
networking.hostName = "zion";
}

View File

@@ -0,0 +1,6 @@
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
# my-module = import ./my-module.nix;
}

View File

@@ -0,0 +1,6 @@
# Add your reusable NixOS modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
# my-module = import ./my-module.nix;
}

View File

@@ -1,8 +1,7 @@
# This file defines overlays # This file defines overlays
{inputs, ...}: { {inputs, ...}: {
# This one brings our custom packages from the 'pkgs' directory # This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: additions = final: _prev: import ../pkgs final.pkgs;
import ../pkgs {pkgs = final;};
# This one contains whatever you want to overlay # This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.
@@ -13,23 +12,6 @@
# }); # });
}; };
# For every flake input, aliases 'pkgs.inputs.${flake}' to
# 'inputs.${flake}.packages.${pkgs.system}' or
# 'inputs.${flake}.legacyPackages.${pkgs.system}'
flake-inputs = final: _: {
inputs =
builtins.mapAttrs (
_: flake: let
legacyPackages = (flake.legacyPackages or {}).${final.system} or {};
packages = (flake.packages or {}).${final.system} or {};
in
if legacyPackages != {}
then legacyPackages
else packages
)
inputs;
};
# When applied, the unstable nixpkgs set (declared in the flake inputs) will # When applied, the unstable nixpkgs set (declared in the flake inputs) will
# be accessible through 'pkgs.unstable' # be accessible through 'pkgs.unstable'
unstable-packages = final: _prev: { unstable-packages = final: _prev: {

5
pkgs/default.nix Normal file
View File

@@ -0,0 +1,5 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
pkgs: {
# example = pkgs.callPackage ./example { };
}