Switch to catppuccin

This commit is contained in:
Andrea Ciceri 2024-05-17 16:08:36 +02:00
parent 116474d8a8
commit f7302479b3
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
48 changed files with 8219 additions and 524 deletions
modules

View file

@ -1,8 +1,8 @@
{
services.adguardhome = {
enable = true;
port = 3000;
settings = {
bind_port = 3000;
openFirewall = true;
};
};

View file

@ -5,6 +5,7 @@
fleetHmModules,
fleetFlake,
vpn,
options,
...
}: let
cfg = config.ccr;
@ -69,46 +70,49 @@ in {
};
};
config = lib.mkIf cfg.enable {
# FIXME shouldn't set these groups by default
ccr.extraGroups = ["wheel" "fuse" "video" "dialout" "systemd-journal" "camera"];
ccr.modules = ["shell" "git" "nix-index" "btop"];
config = lib.mkIf cfg.enable (lib.mkMerge [
(lib.optionalAttrs (builtins.hasAttr "backup" options) {
backup.paths = cfg.backupPaths;
})
{
# FIXME shouldn't set these groups by default
ccr.extraGroups = ["wheel" "fuse" "video" "dialout" "systemd-journal" "camera"];
ccr.modules = ["shell" "git" "nix-index" "btop"];
backup.paths = cfg.backupPaths;
users.users.${cfg.username} = {
inherit (config.ccr) hashedPassword extraGroups description;
uid = 1000;
isNormalUser = true;
shell = cfg.shell;
openssh.authorizedKeys.keys = config.ccr.authorizedKeys;
};
users.users.${cfg.username} = {
inherit (config.ccr) hashedPassword extraGroups description;
uid = 1000;
isNormalUser = true;
shell = cfg.shell;
openssh.authorizedKeys.keys = config.ccr.authorizedKeys;
};
programs.fish.enable = true;
programs.fish.enable = true;
services.getty.autologinUser =
if config.ccr.autologin
then cfg.username
else null;
services.getty.autologinUser =
if config.ccr.autologin
then cfg.username
else null;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${cfg.username} = {
imports =
fleetHmModules cfg.modules
++ [
{
_module.args = {
inherit (config.age) secrets;
inherit (cfg) username;
inherit vpn;
hostname = config.networking.hostName;
};
}
]
++ cfg.extraModules;
home.packages = cfg.packages;
home.stateVersion = config.system.stateVersion;
};
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${cfg.username} = {
imports =
fleetHmModules cfg.modules
++ [
{
_module.args = {
inherit (config.age) secrets;
inherit (cfg) username;
inherit vpn;
hostname = config.networking.hostName;
};
}
]
++ cfg.extraModules;
home.packages = cfg.packages;
home.stateVersion = config.system.stateVersion;
};
}
]);
}

View file

@ -15,7 +15,6 @@
auto-optimise-store = true;
trusted-users = [
"root"
config.ccr.username
"@wheel"
];
netrc-file = "/etc/nix/netrc";
@ -23,14 +22,20 @@
# "s3://cache?profile=default&region=eu-south-1&scheme=https&endpoint=cache.aciceri.dev"
"https://cache.iog.io"
"https://cache.lix.systems"
"https://nix-community.cachix.org"
"https://mlabs.cachix.org"
];
trusted-public-keys = [
# "cache.aciceri.dev~1:nJMfcBnYieY2WMbYDG0s9S5qUhU+V4RPL+X9zcxXxZY="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"mlabs.cachix.org-1:gStKdEqNKcrlSQw5iMW6wFCj3+b+1ASpBVY2SYuNV2M="
];
};
nixPath = ["nixpkgs=${fleetFlake.inputs.nixpkgsUnstable}"];
extraOptions = ''
experimental-features = nix-command flakes ca-derivations impure-derivations
builders-use-substitutes = true
@ -42,55 +47,58 @@
options = "--delete-older-than 180d";
};
registry = lib.mkForce {
nixpkgs.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
nixpkgsUnstable.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
nixpkgsStable.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsStable;
};
n.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
nixfleet.to = {
type = "path";
path = "/home/${config.ccr.username}/projects/aciceri/nixfleet";
};
fleet.to = {
type = "path";
path = "/home/${config.ccr.username}/projects/aciceri/nixfleet";
};
ccrEmacs.to = {
type = "path";
path = "/home/${config.ccr.username}/.config/emacs";
};
};
registry = lib.mkForce ({
nixpkgs.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
nixpkgsUnstable.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
nixpkgsStable.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsStable;
};
n.to = {
type = "path";
path = fleetFlake.inputs.nixpkgsUnstable;
};
}
// (lib.optionalAttrs (builtins.hasAttr "ccr" config) {
nixfleet.to = {
type = "path";
path = "/home/${config.ccr.username}/projects/aciceri/nixfleet";
};
fleet.to = {
type = "path";
path = "/home/${config.ccr.username}/projects/aciceri/nixfleet";
};
ccrEmacs.to = {
type = "path";
path = "/home/${config.ccr.username}/.config/emacs";
};
}));
distributedBuilds = false;
buildMachines = lib.lists.optional (config.networking.hostName == "picard") {
hostName = "sisko.fleet";
system = "aarch64-linux";
maxJobs = 4;
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
protocol = "ssh-ng";
sshUser = "root";
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
};
# ++ (lib.lists.optional (config.networking.hostName == "picard") {
# hostName = "mac.staging.mlabs.city";
# system = "x86_64-darwin";
# maxJobs = 4;
# supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
# protocol = "ssh-ng";
# sshUser = "root";
# sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
# });
distributedBuilds = true;
buildMachines =
lib.lists.optional (config.networking.hostName == "picard") {
hostName = "sisko.fleet";
system = "aarch64-linux";
maxJobs = 7;
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
protocol = "ssh-ng";
sshUser = "root";
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
}
++ (lib.lists.optional (config.networking.hostName == "picard") {
hostName = "mac.staging.mlabs.city";
system = "x86_64-darwin";
maxJobs = 4;
supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"];
protocol = "ssh-ng";
sshUser = "root";
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
});
};
}