mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
refactor: more sane profile structure
This commit is contained in:
parent
a73f0e843a
commit
2257a42d38
123 changed files with 204 additions and 347 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -100,7 +100,7 @@
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
|
inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
|
||||||
inputs.nix-topology.nixosModules.default
|
inputs.nix-topology.nixosModules.default
|
||||||
./profiles/common/nixos
|
./profiles/nixos/common
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home-Manager modules wanted on non-NixOS systems
|
# Home-Manager modules wanted on non-NixOS systems
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
mixedModules = [
|
mixedModules = [
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
inputs.nix-index-database.hmModules.nix-index
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
./profiles/common/home
|
./profiles/home/common
|
||||||
];
|
];
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,12 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${profilesPath}/darwin/common/nixos"
|
"${profilesPath}/darwin/nixos/common"
|
||||||
|
|
||||||
inputs.home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users."leon.schwarzaeugl".imports = [
|
home-manager.users."leon.schwarzaeugl".imports = [
|
||||||
"${profilesPath}/darwin/common/home"
|
"${profilesPath}/darwin/home"
|
||||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||||
}
|
}
|
||||||
] ++ (builtins.attrValues outputs.nixosModules);
|
] ++ (builtins.attrValues outputs.nixosModules);
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ in
|
||||||
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
"${profilesPath}/optional/nixos/autologin.nix"
|
"${profilesPath}/nixos/optional/autologin.nix"
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ in
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users.swarsel.imports = [
|
home-manager.users.swarsel.imports = [
|
||||||
"${self}/profiles/common/home/settings.nix"
|
"${self}/profiles/home/common/settings.nix"
|
||||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -14,18 +14,18 @@ in
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
|
|
||||||
"${profilesPath}/optional/nixos/virtualbox.nix"
|
"${profilesPath}/nixos/optional/virtualbox.nix"
|
||||||
# "${profilesPath}/optional/nixos/vmware.nix"
|
# "${profilesPath}/nixos/optional/vmware.nix"
|
||||||
"${profilesPath}/optional/nixos/autologin.nix"
|
"${profilesPath}/nixos/optional/autologin.nix"
|
||||||
"${profilesPath}/optional/nixos/nswitch-rcm.nix"
|
"${profilesPath}/nixos/optional/nswitch-rcm.nix"
|
||||||
"${profilesPath}/optional/nixos/gaming.nix"
|
"${profilesPath}/nixos/optional/gaming.nix"
|
||||||
"${profilesPath}/optional/nixos/work.nix"
|
"${profilesPath}/nixos/optional/work.nix"
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users.swarsel.imports = outputs.mixedModules ++ [
|
home-manager.users.swarsel.imports = outputs.mixedModules ++ [
|
||||||
"${profilesPath}/optional/home/gaming.nix"
|
"${profilesPath}/home/optional/gaming.nix"
|
||||||
"${profilesPath}/optional/home/work.nix"
|
"${profilesPath}/home/optional/work.nix"
|
||||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||||
}
|
}
|
||||||
] ++ (builtins.attrValues outputs.nixosModules);
|
] ++ (builtins.attrValues outputs.nixosModules);
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
"${profilesPath}/server/nixos"
|
"${profilesPath}/nixos/server"
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users.swarsel.imports = [
|
home-manager.users.swarsel.imports = [
|
||||||
"${profilesPath}/server/home"
|
"${profilesPath}/home/server"
|
||||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,23 +16,23 @@ in
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
|
|
||||||
"${profilesPath}/optional/nixos/autologin.nix"
|
"${profilesPath}/nixos/optional/autologin.nix"
|
||||||
"${profilesPath}/common/nixos/settings.nix"
|
"${profilesPath}/nixos/common/settings.nix"
|
||||||
"${profilesPath}/common/nixos/home-manager.nix"
|
"${profilesPath}/nixos/common/home-manager.nix"
|
||||||
"${profilesPath}/common/nixos/xserver.nix"
|
"${profilesPath}/nixos/common/xserver.nix"
|
||||||
"${profilesPath}/common/nixos/users.nix"
|
"${profilesPath}/nixos/common/users.nix"
|
||||||
"${profilesPath}/common/nixos/impermanence.nix"
|
"${profilesPath}/nixos/common/impermanence.nix"
|
||||||
"${profilesPath}/common/nixos/lanzaboote.nix"
|
"${profilesPath}/nixos/common/lanzaboote.nix"
|
||||||
"${profilesPath}/common/nixos/sops.nix"
|
"${profilesPath}/nixos/common/sops.nix"
|
||||||
"${profilesPath}/server/nixos/ssh.nix"
|
"${profilesPath}/nixos/server/ssh.nix"
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users.swarsel.imports = [
|
home-manager.users.swarsel.imports = [
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
"${profilesPath}/common/home/settings.nix"
|
"${profilesPath}/home/common/settings.nix"
|
||||||
"${profilesPath}/common/home/sops.nix"
|
"${profilesPath}/home/common/sops.nix"
|
||||||
"${profilesPath}/common/home/ssh.nix"
|
"${profilesPath}/home/common/ssh.nix"
|
||||||
|
|
||||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ in
|
||||||
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
"${profilesPath}/optional/nixos/autologin.nix"
|
"${profilesPath}/nixos/optional/autologin.nix"
|
||||||
"${profilesPath}/server/nixos"
|
"${profilesPath}/nixos/server"
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users.swarsel.imports = [
|
home-manager.users.swarsel.imports = [
|
||||||
"${profilesPath}/server/home"
|
"${profilesPath}/home/server"
|
||||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
# NOTE: ... is needed because dikso passes diskoFile
|
|
||||||
{ lib
|
|
||||||
, pkgs
|
|
||||||
, disk ? "/dev/vda"
|
|
||||||
, withSwap ? false
|
|
||||||
, swapSize
|
|
||||||
, config
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
disk0 = {
|
|
||||||
type = "disk";
|
|
||||||
device = disk;
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
ESP = {
|
|
||||||
priority = 1;
|
|
||||||
name = "ESP";
|
|
||||||
size = "512M";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
mountOptions = [ "defaults" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
luks = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "luks";
|
|
||||||
name = "cryptroot";
|
|
||||||
passwordFile = "/tmp/disko-password"; # this is populated by bootstrap-nixos.sh
|
|
||||||
settings = {
|
|
||||||
allowDiscards = true;
|
|
||||||
# https://github.com/hmajid2301/dotfiles/blob/a0b511c79b11d9b4afe2a5e2b7eedb2af23e288f/systems/x86_64-linux/framework/disks.nix#L36
|
|
||||||
crypttabExtraOpts = [
|
|
||||||
"fido2-device=auto"
|
|
||||||
"token-timeout=10"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# Subvolumes must set a mountpoint in order to be mounted,
|
|
||||||
# unless their parent is mounted
|
|
||||||
content = {
|
|
||||||
type = "btrfs";
|
|
||||||
extraArgs = [ "-f" ]; # force overwrite
|
|
||||||
subvolumes = {
|
|
||||||
"@root" = {
|
|
||||||
mountpoint = "/";
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"@persist" = {
|
|
||||||
mountpoint = "${config.hostSpec.persistFolder}";
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"@nix" = {
|
|
||||||
mountpoint = "/nix";
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"@swap" = lib.mkIf withSwap {
|
|
||||||
mountpoint = "/.swapvol";
|
|
||||||
swap.swapfile.size = "${swapSize}G";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.yubikey-manager # For luks fido2 enrollment before full install
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
_:
|
|
||||||
{
|
|
||||||
|
|
||||||
services.emacs = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
_:
|
|
||||||
{
|
|
||||||
services.safeeyes.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -4,6 +4,6 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${profilesPath}/common/home/settings.nix"
|
"${profilesPath}/home/common/settings.nix"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${profilesPath}/common/home/settings.nix"
|
"${profilesPath}/home/common/settings.nix"
|
||||||
./symlink.nix
|
./symlink.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -4,14 +4,14 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${profilesPath}/common/nixos/settings.nix"
|
"${profilesPath}/nixos/common/settings.nix"
|
||||||
"${profilesPath}/common/nixos/home-manager.nix"
|
"${profilesPath}/nixos/common/home-manager.nix"
|
||||||
"${profilesPath}/common/nixos/xserver.nix"
|
"${profilesPath}/nixos/common/xserver.nix"
|
||||||
"${profilesPath}/common/nixos/gc.nix"
|
"${profilesPath}/nixos/common/gc.nix"
|
||||||
"${profilesPath}/common/nixos/store.nix"
|
"${profilesPath}/nixos/common/store.nix"
|
||||||
"${profilesPath}/common/nixos/time.nix"
|
"${profilesPath}/nixos/common/time.nix"
|
||||||
"${profilesPath}/common/nixos/users.nix"
|
"${profilesPath}/nixos/common/users.nix"
|
||||||
"${profilesPath}/common/nixos/nix-ld.nix"
|
"${profilesPath}/nixos/common/nix-ld.nix"
|
||||||
./settings.nix
|
./settings.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue