dsaljdsalkjdsal

This commit is contained in:
Peder Bergebakken Sundt 2024-02-11 02:08:03 +01:00
parent 9de8b974ab
commit c7e5bb7ada
12 changed files with 20 additions and 39 deletions

View File

@ -1,4 +1,9 @@
{ config, pkgs, lib, inputs, ... }: { config, pkgs, lib, inputs, ... }:
let
isTier1 = (builtins.elem config.nixpkgs.system [ "x86_64-linux" "aarch64_linux"]);
in
{ {
imports = let ifExists = p: if builtins.pathExists p then p else {}; in [ imports = let ifExists = p: if builtins.pathExists p then p else {}; in [
./cachix.nix # update with `cachix use --mode nixos -d . FOOBAR` ./cachix.nix # update with `cachix use --mode nixos -d . FOOBAR`
@ -7,6 +12,8 @@
# nice to have if i just dump this flake into /etc/nixos on a clean install # nice to have if i just dump this flake into /etc/nixos on a clean install
(ifExists ./configuration.nix ) (ifExists ./configuration.nix )
(ifExists ./hardware-configuration.nix ) (ifExists ./hardware-configuration.nix )
] ++ lib.optionals isTier1 [
./profiles/upgrade-diff.nix
]; ];
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
@ -26,7 +33,7 @@
smartmontools smartmontools
testdisk testdisk
usbutils usbutils
] ++ lib.optionals (builtins.elem config.nixpkgs.system [ "x86_64-linux" "aarch64_linux"]) [ ] ++ lib.optionals isTier1 [
cage cage
weston weston
]; ];

View File

@ -30,7 +30,7 @@
# https://github.com/NixOS/nixos-hardware # https://github.com/NixOS/nixos-hardware
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
# https://github.com/NixOS/nixos-hardware # https://github.com/tfc/nspawn-nixos
nixos-nspawn.url = "github:tfc/nspawn-nixos"; nixos-nspawn.url = "github:tfc/nspawn-nixos";
nixos-nspawn.flake = false; # we don't use it /shrug nixos-nspawn.flake = false; # we don't use it /shrug
@ -53,7 +53,6 @@
sops-nix-2305.inputs.nixpkgs.follows = "nixpkgs-2305"; sops-nix-2305.inputs.nixpkgs.follows = "nixpkgs-2305";
sops-nix-2305.inputs.nixpkgs-stable.follows = "nixpkgs-2305"; sops-nix-2305.inputs.nixpkgs-stable.follows = "nixpkgs-2305";
/** / /** /
https://willbush.dev/blog/impermanent-nixos/ https://willbush.dev/blog/impermanent-nixos/
matrix-next.url = "github:dali99/nixos-matrix-modules"; # see https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/flake.nix matrix-next.url = "github:dali99/nixos-matrix-modules"; # see https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/flake.nix
@ -254,15 +253,16 @@
nspawn = ls [ "${nixos-nspawn}/nspawn-image.nix" { boot.isContainer = true; } ]; nspawn = ls [ "${nixos-nspawn}/nspawn-image.nix" { boot.isContainer = true; } ];
hidpi = hw.common-hidpi; hidpi = hw.common-hidpi;
p1005 = ./hardware/printer/hp-laserjet-p1005.nix; p1005 = ./hardware/printer/hp-laserjet-p1005.nix;
au = ./profiles/auto-upgrade.nix;
in builtins.mapAttrs (hostname: curried: curried hostname) { in builtins.mapAttrs (hostname: curried: curried hostname) {
#hostname "domain" "system" inputs "state" [ modules ... ] #hostname "domain" "system" inputs "state" [ modules ... ]
noximilien = mk "pbsds.net" "x86_64-linux" inputs-2311 "22.11" [ intel ]; noximilien = mk "pbsds.net" "x86_64-linux" inputs-2311 "22.11" [ au intel ];
brumlebasse = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ amd nspawn ]; brumlebasse = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au amd nspawn ];
nord = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ intel-novga hw.common-cpu-intel-sandy-bridge rocm hidpi ]; nord = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au intel-novga hw.common-cpu-intel-sandy-bridge rocm hidpi ];
sopp = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ intel cuda p1005 ]; sopp = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au intel cuda p1005 ];
bolle = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ intel ]; bolle = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au intel ];
eple = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ intel ]; eple = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au intel ];
garp = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ intel-novga cuda ]; garp = mk "pbsds.net" "x86_64-linux" inputs-2311 "23.11" [ au intel-novga cuda ];
hasselknippe= mk "pbsds.net" "aarch64-linux" inputs-2311 "23.11" [ hw.pine64-pinebook-pro ]; hasselknippe= mk "pbsds.net" "aarch64-linux" inputs-2311 "23.11" [ hw.pine64-pinebook-pro ];
#gomperud smattkuken skrytebiffen skalkesnerken balleby bingus skjrlaltatjlstad #gomperud smattkuken skrytebiffen skalkesnerken balleby bingus skjrlaltatjlstad
#bergjlot snortheimsmoen ditlefsen skrukkerud podebusk zmaragd makrell alfnes blix urke pytte uddu imdorf rosenqvist #bergjlot snortheimsmoen ditlefsen skrukkerud podebusk zmaragd makrell alfnes blix urke pytte uddu imdorf rosenqvist

View File

@ -7,8 +7,6 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/auto-upgrade.nix
../../profiles/upgrade-diff.nix
../../profiles/sshd.nix ../../profiles/sshd.nix
../../users/pbsds ../../users/pbsds

View File

@ -12,8 +12,6 @@
imports = [ imports = [
#./hardware-configuration.nix #./hardware-configuration.nix
../../profiles/auto-upgrade.nix
../../profiles/upgrade-diff.nix
../../profiles/sshd.nix ../../profiles/sshd.nix
../../users/pbsds ../../users/pbsds

View File

@ -7,8 +7,6 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/auto-upgrade.nix
../../profiles/upgrade-diff.nix
../../profiles/sshd.nix ../../profiles/sshd.nix
../../users/pbsds ../../users/pbsds

View File

@ -22,8 +22,6 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/auto-upgrade.nix
../../profiles/upgrade-diff.nix
../../profiles/sshd.nix ../../profiles/sshd.nix
#../../profiles/no-suspend.nix #../../profiles/no-suspend.nix
#../../profiles/podman.nix #../../profiles/podman.nix

View File

@ -15,8 +15,6 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/auto-upgrade.nix
../../profiles/upgrade-diff.nix
../../profiles/sshd.nix ../../profiles/sshd.nix
../../users/pbsds ../../users/pbsds

View File

@ -6,8 +6,6 @@
boot.loader.grub.useOSProber = true; boot.loader.grub.useOSProber = true;
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/auto-upgrade.nix
../../profiles/upgrade-diff.nix
../../profiles/sshd.nix ../../profiles/sshd.nix
../../profiles/podman.nix ../../profiles/podman.nix

View File

@ -22,8 +22,6 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
../../profiles/auto-upgrade.nix
../../profiles/upgrade-diff.nix
../../profiles/sshd.nix ../../profiles/sshd.nix
../../profiles/no-suspend.nix ../../profiles/no-suspend.nix
../../profiles/podman.nix ../../profiles/podman.nix

View File

@ -1,6 +1,6 @@
{ config, pkgs, lib, inputs, ... }: { config, pkgs, lib, inputs, ... }:
{ {
# 'nixos-rebuild switch --upgrade', by default daily with no reboot
system.autoUpgrade.enable = true; system.autoUpgrade.enable = true;
#system.autoUpgrade.allowReboot = true; # reboot after a kernel (module) or initrd upgrade, consider also setting `rebootWindow` #system.autoUpgrade.allowReboot = true; # reboot after a kernel (module) or initrd upgrade, consider also setting `rebootWindow`
@ -26,10 +26,6 @@
#system.autoUpgrade.flake = "github:pbsds/nix-config"; # TODO: use this instead? #system.autoUpgrade.flake = "github:pbsds/nix-config"; # TODO: use this instead?
system.autoUpgrade.flags = [ system.autoUpgrade.flags = [
"--recreate-lock-file" # fetch new inputs "--recreate-lock-file" # fetch new inputs
#"--update-input" "nixpkgs"
#"--update-input" "unstable"
#"--update-input" "home-manager"
#"--update-input" "nixos-hardware"
"--no-write-lock-file" # no write new flakelock, as the in-store flake is read-only "--no-write-lock-file" # no write new flakelock, as the in-store flake is read-only
"-L" # print build logs "-L" # print build logs
]; ];

View File

@ -1,18 +1,10 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cachix
nix-output-monitor nix-output-monitor
nix-prefetch
nix-top nix-top
#nix-index
nix-tree
nix-search-cli # nix-search nix-search-cli # nix-search
nix-diff nix-diff
#comma comma
nixfmt
alejandra
#nixpkgs-hammering
#nixpkgs-review
]; ];
} }

View File

@ -30,7 +30,7 @@
''; '';
imports = [ ../modules/jump.nix ]; imports = [ ../modules/jump.nix ];
programs.jump.enableBash = true; # TODO: upstream? programs.jump.enableBash = true; # TODO: upstream? export in flake?
programs.nix-index.enable = true; programs.nix-index.enable = true;
programs.nix-index-database.comma.enable = true; # via nix-index-database flake programs.nix-index-database.comma.enable = true; # via nix-index-database flake