nixos-configs/common/default.nix

132 lines
2.4 KiB
Nix
Raw Permalink Normal View History

2023-11-22 15:33:16 -05:00
{
config,
2023-12-03 04:50:17 -05:00
home-manager,
lib,
2023-11-22 15:33:16 -05:00
nh,
pkgs,
2024-06-15 22:51:36 -04:00
self,
2023-11-22 15:33:16 -05:00
...
}: {
2023-10-15 14:43:23 -04:00
imports = [
./vars
./modules
./packages.nix
self.nixosModules.borgbackup
2023-12-03 04:50:17 -05:00
home-manager.nixosModules.home-manager
2023-10-15 14:43:23 -04:00
];
2024-04-18 14:37:46 -04:00
boot.tmp.useTmpfs = true;
2024-06-28 13:40:52 -04:00
systemd.services.nix-daemon = {
environment.TMPDIR = "/home/nix-cache";
2024-06-28 13:40:52 -04:00
preStart = ''
mkdir -p ${config.systemd.services.nix-daemon.environment.TMPDIR}
'';
};
nix = {
chore: update flake.lock Flake Inputs: • Updated input 'astal': 'github:Aylur/astal/71ee1ea' (2024-09-14) → 'github:Aylur/astal/36adb5a' (2024-09-18) • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/1975161' (2024-09-14) → 'github:matt1432/discord-nightly-overlay/64c50d0' (2024-09-18) • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=4a8544e' (2024-09-15) → 'git+https://repo.dec05eba.com/gpu-screen-recorder?ref=refs/heads/master&rev=6e73e40' (2024-09-18) • Updated input 'home-manager': 'github:nix-community/home-manager/a9c9cc6' (2024-09-15) → 'github:nix-community/home-manager/d2493de' (2024-09-17) • Updated input 'hyprland': 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=9e35656&submodules=1' (2024-09-15) → 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=e6cf643&submodules=1' (2024-09-18) • Updated input 'hyprland/aquamarine': 'github:hyprwm/aquamarine/e4a1320' (2024-09-07) → 'github:hyprwm/aquamarine/752d0fb' (2024-09-18) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/02cf60c' (2024-09-12) → 'github:Jovian-Experiments/Jovian-NixOS/f7a1bb0' (2024-09-18) • Updated input 'nix-index-db': 'github:Mic92/nix-index-database/0a2fba6' (2024-09-15) → 'github:Mic92/nix-index-database/c1b0fa0' (2024-09-16) • Updated input 'nixd': 'github:nix-community/nixd/f6ca743' (2024-08-22) → 'github:nix-community/nixd/e2f0d90' (2024-09-18) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/a36467e' (2024-09-15) → 'github:nix-community/nixpkgs-wayland/aaedb02' (2024-09-18) • Updated input 'sops-nix': 'github:Mic92/sops-nix/f30b1ba' (2024-09-13) → 'github:Mic92/sops-nix/e2d404a' (2024-09-16) Docker Images: • vegardit/gitea-act-runner dind-latest: sha256:acc510a4754aa871dcaac69396055fea3117b5378a36efd9fbf3b3db542fa81a → sha256:378efec2a8f9e17874965b6a03ea935b0195eb85bdf60305eee994f684134f27 • ghcr.io/linuxserver/bazarr latest: sha256:476c315f0381d0b8c7921fbf3116b65e96ae32128df5fd27600e97213b862809 → sha256:71f545e4a6cfda02798fd531bfc27b14cbf7345bb28fe503467fb1ab13c3bfbc • ghcr.io/linuxserver/prowlarr latest: sha256:c1318191d5211ac7462c754422eafe350ed0de61c4160065a420896068ec1ccc → sha256:bddc64a17aa38972f4c032f67efc3bf0a498883257e615a2d807ca44550cebf0 Firefox Addons: darkreader: 4.9.89 -> 4.9.92
2024-09-18 17:47:10 -04:00
package = pkgs.nixVersions.nix_2_24;
2024-07-24 21:58:37 -04:00
# Edit nix.conf
settings = {
# Store
keep-outputs = true;
keep-derivations = true;
auto-optimise-store = true;
# Commands
experimental-features = ["nix-command" "flakes"];
http-connections = 0; # unlimited for local cache
warn-dirty = false;
show-trace = true;
2024-06-10 22:57:20 -04:00
allow-import-from-derivation = true;
2023-12-20 03:47:22 -05:00
# remote building
trusted-users = ["matt" "nixremote"];
};
};
2024-04-18 14:37:46 -04:00
programs.nh = {
enable = true;
2024-04-18 14:37:46 -04:00
package = nh.packages.${pkgs.system}.default;
# weekly cleanup
clean = {
enable = true;
extraArgs = "--keep-since 30d";
};
2023-11-19 15:32:28 -05:00
};
2023-11-30 17:01:46 -05:00
services = {
fwupd.enable = true;
xserver.xkb = {
2023-11-30 17:01:46 -05:00
layout = "ca";
variant = "multix";
2023-11-30 17:01:46 -05:00
};
};
boot.supportedFilesystems = ["ext4" "xfs" "btrfs" "vfat" "ntfs"];
system.fsPackages = builtins.attrValues {
inherit
(pkgs)
btrfs-progs
nfs-utils
ntfs3g
xfsprogs
;
};
2024-07-31 15:50:51 -04:00
environment.variables.NPM_CONFIG_GLOBALCONFIG = "/etc/npmrc";
environment.etc.npmrc.text = ''
fund = false
update-notifier = false
'';
2024-09-12 13:30:14 -04:00
environment.systemPackages = builtins.attrValues {
# Peripherals
inherit
(pkgs)
hdparm
pciutils
usbutils
rar
;
};
home-manager.users = let
inherit (lib) mkIf mkOption types;
inherit (config.vars) mainUser;
2024-01-04 03:39:14 -05:00
2023-10-15 14:30:30 -04:00
default = {
imports = [
2023-12-08 12:48:48 -05:00
# Make the vars be the same on Nix and HM
{
options.vars = mkOption {
type = types.attrs;
readOnly = true;
default = config.vars;
};
}
2023-12-08 12:48:48 -05:00
{
programs.bash.sessionVariables = {
FLAKE = config.environment.variables.FLAKE;
};
}
./home
2023-12-23 22:57:43 -05:00
./home/trash-d
2023-10-15 14:30:30 -04:00
];
home.stateVersion = config.system.stateVersion;
2023-10-15 14:30:30 -04:00
};
in {
2024-09-12 13:30:14 -04:00
root = default;
greeter = mkIf (config.services.greetd.enable) default;
${mainUser} = default;
2023-10-15 14:30:30 -04:00
};
2023-10-15 14:43:23 -04:00
}