mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-01-18 17:11:39 +01:00
cleanup
This commit is contained in:
parent
45628bdbc3
commit
78b1a5761c
13 changed files with 52 additions and 113 deletions
21
flake.lock
21
flake.lock
|
@ -171,11 +171,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698250431,
|
"lastModified": 1698479159,
|
||||||
"narHash": "sha256-qs2gTeH4wpnWPO6Oi6sOhp2IhG0i0DzcnrJxIY3/CP8=",
|
"narHash": "sha256-rJHBDwW4LbADEfhkgGHjKGfL2dF44NrlyXdXeZrQahs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "09587fbbc6a669f7725613e044c2577dc5d43ab5",
|
"rev": "f92a54fef4eacdbe86b0a2054054dd58b0e2a2a4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -301,17 +301,18 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698134075,
|
"lastModified": 1698463958,
|
||||||
"narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=",
|
"narHash": "sha256-4L0hGqplwNYWFhqhPbsQh6U7s4KiUSE2nhQdCZg981c=",
|
||||||
"owner": "NixOS",
|
"owner": "imlonghao",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4",
|
"rev": "88bc98a073d12dc7e0c8b766a55d39ebeaed9927",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "imlonghao",
|
||||||
"ref": "nixos-unstable",
|
"ref": "borgmatic/fix-262020",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
description = "My nix setup";
|
description = "My nix setup";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
||||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
# nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||||
|
nixpkgs.url = "github:imlonghao/nixpkgs/borgmatic/fix-262020";
|
||||||
|
|
||||||
nix-index-database = {
|
nix-index-database = {
|
||||||
url = "github:nix-community/nix-index-database";
|
url = "github:nix-community/nix-index-database";
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
|
|
|
@ -17,16 +17,12 @@
|
||||||
label = "nuc";
|
label = "nuc";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
storage = {
|
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
||||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
compression = "lz4";
|
||||||
compression = "lz4";
|
keep_daily = 7;
|
||||||
};
|
keep_weekly = 4;
|
||||||
retention = {
|
keep_monthly = 12;
|
||||||
keep_daily = 7;
|
keep_yearly = 3;
|
||||||
keep_weekly = 4;
|
|
||||||
keep_monthly = 12;
|
|
||||||
keep_yearly = 3;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
# ./modules/adguard
|
# ./modules/adguard
|
||||||
./modules/networks
|
./modules/networks
|
||||||
./modules/backup
|
# ./modules/backup
|
||||||
# ./modules/hydra
|
# ./modules/hydra
|
||||||
./modules/matrix
|
./modules/matrix
|
||||||
./modules/nextcloud
|
./modules/nextcloud
|
||||||
|
@ -23,9 +22,6 @@
|
||||||
tmp.useTmpfs = true;
|
tmp.useTmpfs = true;
|
||||||
};
|
};
|
||||||
services.btrfs.autoScrub.enable = true;
|
services.btrfs.autoScrub.enable = true;
|
||||||
nix.settings = {
|
|
||||||
auto-optimise-store = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets."store/secretkey" = { };
|
sops.secrets."store/secretkey" = { };
|
||||||
nix.extraOptions = ''
|
nix.extraOptions = ''
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
services.borgmatic = {
|
services.borgmatic = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
# fix failing check
|
|
||||||
location = null;
|
|
||||||
source_directories = [
|
source_directories = [
|
||||||
"/var/lib"
|
"/var/lib"
|
||||||
"/var/log"
|
"/var/log"
|
||||||
|
@ -25,10 +23,8 @@
|
||||||
path = "/mnt/backup/nuc";
|
path = "/mnt/backup/nuc";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
storage = {
|
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
||||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
compression = "lz4";
|
||||||
compression = "lz4";
|
|
||||||
};
|
|
||||||
retention = {
|
retention = {
|
||||||
keep_daily = 7;
|
keep_daily = 7;
|
||||||
keep_weekly = 4;
|
keep_weekly = 4;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./modules/backup
|
# ./modules/backup
|
||||||
./modules/networks
|
./modules/networks
|
||||||
./modules/greetd
|
./modules/greetd
|
||||||
./modules/virtualisation
|
./modules/virtualisation
|
||||||
|
@ -34,44 +34,6 @@
|
||||||
tmp.useTmpfs = true;
|
tmp.useTmpfs = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
|
||||||
settings = {
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
# substituters = [
|
|
||||||
# "ssh://nuc.lan"
|
|
||||||
# ];
|
|
||||||
# trusted-public-keys = [
|
|
||||||
# "nuc.lan:a9UkVw3AizAKCER1CfNGhx8UOMF4t4UGE3GJ9dmHwJc="
|
|
||||||
# ];
|
|
||||||
};
|
|
||||||
# distributedBuilds = true;
|
|
||||||
# extraOptions = ''
|
|
||||||
# builders-use-substitutes = true
|
|
||||||
# '';
|
|
||||||
# buildMachines = [
|
|
||||||
# {
|
|
||||||
# hostName = "nuc.lan";
|
|
||||||
# system = "x86_64-linux";
|
|
||||||
# protocol = "ssh-ng";
|
|
||||||
# maxJobs = 2;
|
|
||||||
# speedFactor = 1;
|
|
||||||
# supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
|
||||||
# mandatoryFeatures = [ ];
|
|
||||||
# }
|
|
||||||
# {
|
|
||||||
# hostName = "quitte.ifsr.de";
|
|
||||||
# system = "x86_64-linux";
|
|
||||||
# protocol = "ssh-ng";
|
|
||||||
# maxJobs = 12;
|
|
||||||
# sshUser = "rouven.seifert";
|
|
||||||
# speedFactor = 10;
|
|
||||||
# supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
|
||||||
# mandatoryFeatures = [ ];
|
|
||||||
# }
|
|
||||||
# ];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.persistence."/nix/persist/system" = {
|
environment.persistence."/nix/persist/system" = {
|
||||||
directories = [
|
directories = [
|
||||||
"/etc/nixos" # bind mounted from /nix/persist/system/etc/nixos to /etc/nixos
|
"/etc/nixos" # bind mounted from /nix/persist/system/etc/nixos to /etc/nixos
|
||||||
|
@ -93,8 +55,6 @@
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
console = {
|
console = {
|
||||||
keyMap = "dvorak";
|
keyMap = "dvorak";
|
||||||
# font = "Lat2-Terminus16";
|
|
||||||
# earlySetup = true;
|
|
||||||
colors = let colors = config.home-manager.users.rouven.colorScheme.colors; in
|
colors = let colors = config.home-manager.users.rouven.colorScheme.colors; in
|
||||||
[
|
[
|
||||||
colors.base00
|
colors.base00
|
||||||
|
@ -128,6 +88,7 @@
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
#hardware.pulseaudio.enable = true;
|
#hardware.pulseaudio.enable = true;
|
||||||
|
hardware.opengl.enable = true;
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
services.borgmatic = {
|
services.borgmatic = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
# fix failing check
|
location = { };
|
||||||
location = null;
|
|
||||||
source_directories = [
|
source_directories = [
|
||||||
"/var/lib"
|
"/var/lib"
|
||||||
"/var/log"
|
"/var/log"
|
||||||
|
@ -34,16 +33,12 @@
|
||||||
"/home/*/.local/share"
|
"/home/*/.local/share"
|
||||||
"/home/*/Linux/Isos"
|
"/home/*/Linux/Isos"
|
||||||
];
|
];
|
||||||
storage = {
|
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
||||||
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
compression = "lz4";
|
||||||
compression = "lz4";
|
keep_daily = 7;
|
||||||
};
|
keep_weekly = 4;
|
||||||
retention = {
|
keep_monthly = 12;
|
||||||
keep_daily = 7;
|
keep_yearly = 3;
|
||||||
keep_weekly = 4;
|
|
||||||
keep_monthly = 12;
|
|
||||||
keep_yearly = 3;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
./gpg.nix
|
./gpg.nix
|
||||||
./sops.nix
|
./sops.nix
|
||||||
./vim.nix
|
./vim.nix
|
||||||
|
./nix.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./yazi.nix
|
./yazi.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
|
|
15
shared/nix.nix
Normal file
15
shared/nix.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, nixpkgs, ... }:
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
# expose all flake inputs through nix Path and registry
|
||||||
|
registry = {
|
||||||
|
nixpkgs.flake = nixpkgs;
|
||||||
|
};
|
||||||
|
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
||||||
|
# keep build-time deps around for offline-rebuilding
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -81,16 +81,6 @@
|
||||||
echo System package diff:
|
echo System package diff:
|
||||||
${config.nix.package}/bin/nix store diff-closures $(command ls -d /nix/var/nix/profiles/system-* | tail -2)
|
${config.nix.package}/bin/nix store diff-closures $(command ls -d /nix/var/nix/profiles/system-* | tail -2)
|
||||||
}
|
}
|
||||||
|
|
||||||
shell() {
|
|
||||||
unset PKGS
|
|
||||||
for var in "$@"
|
|
||||||
do
|
|
||||||
PKGS=$PKGS\ nixpkgs/nixos-unstable\\#$var
|
|
||||||
done
|
|
||||||
eval ${pkgs.nix-output-monitor}/bin/nom shell $PKGS
|
|
||||||
}
|
|
||||||
|
|
||||||
'';
|
'';
|
||||||
promptInit =
|
promptInit =
|
||||||
''
|
''
|
||||||
|
|
|
@ -26,27 +26,15 @@
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
## use after helix update
|
|
||||||
# languages = {
|
|
||||||
# language-server.rnix-lsp = {
|
|
||||||
# command = "rnix-lsp";
|
|
||||||
# };
|
|
||||||
# language = [
|
|
||||||
# {
|
|
||||||
# name = "nix";
|
|
||||||
# auto-format = true;
|
|
||||||
# language-servers = [ "rnix-lsp" ];
|
|
||||||
# }
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
## old version
|
|
||||||
languages = {
|
languages = {
|
||||||
|
language-server.rnix-lsp = {
|
||||||
|
command = "rnix-lsp";
|
||||||
|
};
|
||||||
language = [
|
language = [
|
||||||
{
|
{
|
||||||
name = "nix";
|
name = "nix";
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
language-server.command = "rnix-lsp";
|
language-servers = [ "rnix-lsp" ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -48,7 +48,6 @@ in
|
||||||
element-desktop
|
element-desktop
|
||||||
gomuks # alternative matrix client
|
gomuks # alternative matrix client
|
||||||
mattermost-desktop
|
mattermost-desktop
|
||||||
gajim
|
|
||||||
|
|
||||||
# games
|
# games
|
||||||
# dwarf-fortress-packages.dwarf-fortress-full
|
# dwarf-fortress-packages.dwarf-fortress-full
|
||||||
|
@ -89,6 +88,7 @@ in
|
||||||
# libs
|
# libs
|
||||||
libyubikey
|
libyubikey
|
||||||
libfido2
|
libfido2
|
||||||
|
python311Packages.pyhanko
|
||||||
];
|
];
|
||||||
|
|
||||||
services.kdeconnect = {
|
services.kdeconnect = {
|
||||||
|
|
Loading…
Reference in a new issue