Update to (somewhat?) dendritic pattern
Heavily inspired by https://github.com/Doc-Steve/dendritic-design-with-flake-parts. > Atomic commits? Never heard of them!
This commit is contained in:
9
modules/system-types/base/homeManager.nix
Normal file
9
modules/system-types/base/homeManager.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.homeManager.system-base = { config, ... }: {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
];
|
||||
|
||||
home.homeDirectory = "/home/${config.home.username}";
|
||||
home.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
65
modules/system-types/base/nixos.nix
Normal file
65
modules/system-types/base/nixos.nix
Normal file
@@ -0,0 +1,65 @@
|
||||
{ inputs, ... }: {
|
||||
flake-file.inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
flake.modules.nixos.system-base = { pkgs, ... }: {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
home-manager
|
||||
secrets
|
||||
openssh
|
||||
linux-latest
|
||||
cli-tools
|
||||
zsh
|
||||
gnupg
|
||||
];
|
||||
|
||||
# Make unstable nixpkgs available as pkgs.unstable
|
||||
nixpkgs.overlays = [
|
||||
(final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
inherit (final) config;
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
};
|
||||
})
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
# high priority since it's almost always used
|
||||
"https://cache.nixos.org?priority=10"
|
||||
"https://install.determinate.systems"
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM"
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
# "allow-import-from-derivation"
|
||||
];
|
||||
|
||||
download-buffer-size = 1024 * 1024 * 1024;
|
||||
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
28
modules/system-types/desktop/desktop.nix
Normal file
28
modules/system-types/desktop/desktop.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ inputs, ... }: {
|
||||
flake.modules.nixos.system-desktop = {
|
||||
imports = with inputs.self.modules.nixos; [
|
||||
system-base
|
||||
hyprland
|
||||
|
||||
#TODO: moar aspects
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
inputs.self.modules.homeManager.system-desktop
|
||||
];
|
||||
};
|
||||
|
||||
flake.modules.homeManager.system-desktop = {
|
||||
imports = with inputs.self.modules.homeManager; [
|
||||
system-base
|
||||
|
||||
rofi
|
||||
kitty
|
||||
|
||||
browser
|
||||
multimedia
|
||||
zsh
|
||||
thunderbird
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user