nixos-configs/common/default.nix

144 lines
2.8 KiB
Nix
Raw 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 = {
2024-09-12 13:30:14 -04:00
# FIXME: wait for this to reach nixos-unstable https://pr-tracker.nelim.org/?pr=341007
2024-09-10 12:00:03 -04:00
package = pkgs.nixVersions.nix_2_24.overrideAttrs (o: rec {
version = "2.24.6";
src = pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nix";
rev = version;
hash = "sha256-kgq3B+olx62bzGD5C6ighdAoDweLq+AebxVHcDnKH4w=";
};
chore: update flake.lock Flake Inputs: • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/38e756a' (2024-09-10) → 'github:matt1432/discord-nightly-overlay/4bae358' (2024-09-12) • Updated input 'home-manager': 'github:nix-community/home-manager/e5fa72b' (2024-09-10) → 'github:nix-community/home-manager/da8406a' (2024-09-12) • Updated input 'hyprland': 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=155d440&submodules=1' (2024-09-10) → 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=118be4d&submodules=1' (2024-09-12) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/b9af8b3' (2024-09-10) → 'github:Jovian-Experiments/Jovian-NixOS/02cf60c' (2024-09-12) • Updated input 'nix-gaming': 'github:fufexan/nix-gaming/5e1b352' (2024-09-10) → 'github:fufexan/nix-gaming/3a97598' (2024-09-12) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/574d1ea' (2024-09-06) → 'github:NixOS/nixpkgs/1355a0c' (2024-09-10) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/9004631' (2024-09-10) → 'github:nix-community/nixpkgs-wayland/5eedb68' (2024-09-12) Docker Images: • vegardit/gitea-act-runner dind-latest: sha256:674ef43377a9b802d53cbcf97ee128f95dd00cec817fb075950dcf7a618d880c → sha256:acc510a4754aa871dcaac69396055fea3117b5378a36efd9fbf3b3db542fa81a • rssbridge/rss-bridge latest: sha256:833fa82afded7dd01514807009ccf66983bc21d874fc6acbe057a1fcda0f5e2d → sha256:fada58f35c97d4e50ae045176339722b69397a6803a46c00799a96160db84092 • ghcr.io/immich-app/immich-machine-learning v1.115.0: sha256:c0300d34fb275343c8e3b50796c9b10e6f33218e84c958386a218fbdceaeed65 → sha256:66f13f7fb1af555f9f1767c3dd5d404b7e5f486a272dc73af9e6480f541463dc • ghcr.io/immich-app/immich-server v1.115.0: sha256:df4ae6d2bf8aa3ebd6370b42a667a007c5e7452a1cd2ab4c22fbaff9a69ffcbc → sha256:544fcfc41ce97833e33126e5041fb3b821e3db7bf405b54ac06689247a170a90 • ghcr.io/linuxserver/bazarr latest: sha256:0364bb3d8d03cf0995036140322f6d0de78dd1924ba990499f67598f7c61ff62 → sha256:16a30c1ef7412f3781dc9635bd42798399601a9750f871cb68e5efb5545ce0f5 • ghcr.io/linuxserver/prowlarr latest: sha256:9dd32e2270d174b07bd33a1f54e2b79e03ad944df62ed93efa08f4a381adc9a1 → sha256:c1318191d5211ac7462c754422eafe350ed0de61c4160065a420896068ec1ccc • ghcr.io/linuxserver/sabnzbd latest: sha256:66576a72ecb80c8d9e8ebffd4699995b29bfff4aefba4c6eae14baac3cbf6716 → sha256:cf7743af338e1cdfc97f6e6c605c8c45d737a4f268ab96ba6cec565134cea5e1 Firefox Addons: sponsorblock: 5.7 -> 5.8.1
2024-09-12 21:35:53 -04:00
meta = removeAttrs o.meta ["knownVulnerabilities"];
2024-09-10 12:00:03 -04:00
});
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
}