Another reformatting & refactor

- fix all statix lints
- format with nixpkgs-fmt instead of alejandro
This commit is contained in:
Tristan D. 2023-10-17 14:12:26 +02:00
parent 8c7c84c129
commit 4539cc5b75
Signed by: tristan
SSH key fingerprint: SHA256:U7y6eMb7CQDaTHv9XoX6/BaQnPqyxxKc+Xnfcefi6rY
14 changed files with 454 additions and 437 deletions

212
flake.nix
View file

@ -58,110 +58,114 @@
}; };
}; };
outputs = { outputs =
nixpkgs, { nixpkgs
nixpkgs-unstable, , nixpkgs-unstable
nixos-unstable, , nixos-unstable
home-manager, , home-manager
emacs-overlay, , emacs-overlay
nur, , nur
nix-index-database, , nix-index-database
disko, , disko
... , ...
} @ inputs: let } @ inputs:
system = "x86_64-linux"; let
unstable-os = import nixos-unstable pkgs-args; system = "x86_64-linux";
unstable-os-overlay = _final: _prev: { unstable-os = import nixos-unstable pkgs-args;
unstable-os = unstable-os.pkgs; unstable-os-overlay = _final: _prev: {
}; unstable-os = unstable-os.pkgs;
unstable-pkgs = import nixpkgs-unstable pkgs-args; };
unstable-pkgs-overlay = _final: _prev: { unstable-pkgs = import nixpkgs-unstable pkgs-args;
unstable-pkgs = unstable-pkgs.pkgs; unstable-pkgs-overlay = _final: _prev: {
}; unstable-pkgs = unstable-pkgs.pkgs;
overlays = [ };
unstable-os-overlay overlays = [
unstable-pkgs-overlay unstable-os-overlay
emacs-overlay.overlay unstable-pkgs-overlay
]; emacs-overlay.overlay
pkgs-args = { ];
system = system; pkgs-args = {
overlays = overlays; inherit system;
config = { inherit overlays;
allowUnfree = true; config = {
allowUnfree = true;
};
};
pkgs = import nixpkgs pkgs-args;
hmModules = [
nix-index-database.hmModules.nix-index
nur.hmModules.nur
inputs.plasma-manager.homeManagerModules.plasma-manager
];
osModules = [
disko.nixosModules.disko
home-manager.nixosModules.home-manager
nix-index-database.nixosModules.nix-index
nur.nixosModules.nur
inputs.nix-ld.nixosModules.nix-ld
inputs.tuxedo-nixos.nixosModules.default
];
args = {
inherit inputs;
inherit system;
};
in
{
formatter = {
${system} = pkgs.nixpkgs-fmt;
};
diskoConfigurations = {
nixos-pulse = import ./systems/nixos-pulse/disko.nix;
};
homeConfigurations = {
"tester@tristan-desk-arch" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
[
./users/tester.nix
{
_module = { inherit args; };
targets.genericLinux.enable = true;
programs = {
bash.enable = true;
zsh.enable = true;
home-manager.enable = true;
};
}
]
++ hmModules;
};
"tristand" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
[
./users/tristand.nix
{
_module = { inherit args; };
xsession.enable = true;
}
]
++ hmModules;
};
};
nixosConfigurations = {
nixos-pulse = nixpkgs.lib.nixosSystem {
modules =
[
./systems/nixos-pulse
{
_module = { inherit args; };
nix.registry.nixpkgs.flake = nixpkgs;
nixpkgs.pkgs = pkgs;
home-manager.sharedModules = hmModules;
}
]
++ osModules;
};
}; };
}; };
pkgs = import nixpkgs pkgs-args;
hmModules = [
nix-index-database.hmModules.nix-index
nur.hmModules.nur
inputs.plasma-manager.homeManagerModules.plasma-manager
];
osModules = [
disko.nixosModules.disko
home-manager.nixosModules.home-manager
nix-index-database.nixosModules.nix-index
nur.nixosModules.nur
inputs.nix-ld.nixosModules.nix-ld
inputs.tuxedo-nixos.nixosModules.default
];
args = {
inherit inputs;
inherit system;
};
in {
formatter = {
${system} = pkgs.alejandra;
};
diskoConfigurations = {
nixos-pulse = import ./systems/nixos-pulse/disko.nix;
};
homeConfigurations = {
"tester@tristan-desk-arch" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
[
./users/tester.nix
{
_module = {inherit args;};
targets.genericLinux.enable = true;
programs.bash.enable = true;
programs.zsh.enable = true;
programs.home-manager.enable = true;
}
]
++ hmModules;
};
"tristand" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
[
./users/tristand.nix
{
_module = {inherit args;};
xsession.enable = true;
}
]
++ hmModules;
};
};
nixosConfigurations = {
nixos-pulse = nixpkgs.lib.nixosSystem {
modules =
[
./systems/nixos-pulse
{
_module = {inherit args;};
nix.registry.nixpkgs.flake = nixpkgs;
nixpkgs.pkgs = pkgs;
home-manager.sharedModules = hmModules;
}
]
++ osModules;
};
};
};
} }

View file

@ -1,10 +1,10 @@
{ { lib
lib, , pkgs
pkgs, , config
config, , inputs
inputs, , ...
... }:
}: let let
doomemacsSrc = builtins.fetchGit { doomemacsSrc = builtins.fetchGit {
url = "https://github.com/doomemacs/doomemacs"; url = "https://github.com/doomemacs/doomemacs";
ref = "master"; ref = "master";
@ -14,118 +14,123 @@
personalDoomConfSrc = builtins.fetchGit { personalDoomConfSrc = builtins.fetchGit {
url = "https://git.vlt81.de/tristan/doom"; url = "https://git.vlt81.de/tristan/doom";
ref = "main"; ref = "main";
rev = "e6d22f794c68a5f3ac56861e7e2ed6642cdef16a"; rev = "c6558ab65f106628a3bdb890df935bb7965edd95";
}; };
in { in
{
xdg.enable = true; xdg.enable = true;
programs.alacritty = { programs = {
enable = true; alacritty = {
settings = { enable = true;
window.opacity = 0.88; settings = {
window.dimensions = { window.opacity = 0.88;
lines = 40; window.dimensions = {
columns = 150; lines = 40;
columns = 150;
};
}; };
}; };
};
programs.starship = { starship = {
enable = true; enable = true;
package = pkgs.unstable-pkgs.starship; package = pkgs.unstable-pkgs.starship;
};
programs.fish = {
enable = true;
package = pkgs.unstable-pkgs.fish;
interactiveShellInit = ''
any-nix-shell fish --info-right | source
direnv hook fish | source
'';
loginShellInit = ''
direnv hook fish | source
'';
functions = {
ec = "emacsclient $argv";
ecc = "emacsclient -c $argv";
ecr = "emacsclient -r $argv";
ecrr = "emacsclient -r $argv";
}; };
};
programs.git = { fish = {
enable = true; enable = true;
userName = "Tristan Druyen"; package = pkgs.unstable-pkgs.fish;
userEmail = "tristan@vault81.de";
aliases = {
ci = "commit";
co = "checkout";
s = "status";
};
extraConfig = {
user.signingkey = "${config.home.homeDirectory}/.ssh/id_ed25519";
commit.gpgsign = true;
gpg.format = "ssh";
};
package = pkgs.unstable-pkgs.git;
};
programs.nix-index = { interactiveShellInit = ''
enable = true; any-nix-shell fish --info-right | source
enableFishIntegration = true; direnv hook fish | source
}; '';
loginShellInit = ''
direnv hook fish | source
'';
programs.ssh = { functions = {
enable = true; ec = "emacsclient $argv";
package = pkgs.unstable-pkgs.openssh; ecc = "emacsclient -c $argv";
ecr = "emacsclient -r $argv";
matchBlocks = { ecrr = "emacsclient -r $argv";
"he3" = {
host = "he3";
hostname = "he3.vault81.de";
user = "root";
identityFile = "~/.ssh/id_hetz_ed25519";
};
"he2" = {
host = "he2";
hostname = "he2.vault81.de";
user = "root";
identityFile = "~/.ssh/id_v81_ed25519";
};
"desk-arch" = {
host = "desk-arch";
hostname = "tristan-desk-arch";
user = "tristand";
identityFile = "~/.ssh/id_v81_ed25519";
}; };
}; };
git = {
enable = true;
userName = "Tristan Druyen";
userEmail = "tristan@vault81.de";
aliases = {
ci = "commit";
co = "checkout";
s = "status";
};
extraConfig = {
user.signingkey = "${config.home.homeDirectory}/.ssh/id_ed25519";
commit.gpgsign = true;
gpg.format = "ssh";
};
package = pkgs.unstable-pkgs.git;
};
nix-index = {
enable = true;
enableFishIntegration = true;
};
ssh = {
enable = true;
package = pkgs.unstable-pkgs.openssh;
matchBlocks = {
"he3" = {
host = "he3";
hostname = "he3.vault81.de";
user = "root";
identityFile = "~/.ssh/id_hetz_ed25519";
};
"he2" = {
host = "he2";
hostname = "he2.vault81.de";
user = "root";
identityFile = "~/.ssh/id_v81_ed25519";
};
"desk-arch" = {
host = "desk-arch";
hostname = "tristan-desk-arch";
user = "tristand";
identityFile = "~/.ssh/id_v81_ed25519";
};
};
};
gpg = {
enable = true;
package = pkgs.unstable-pkgs.gnupg;
};
}; };
programs.gpg = { services = {
enable = true; gpg-agent = {
enable = true;
package = pkgs.unstable-pkgs.gnupg; enableExtraSocket = true;
}; enableSshSupport = true;
};
services.gpg-agent = { lorri.enable = true;
enable = true;
enableExtraSocket = true; emacs = {
enableSshSupport = true; enable = true;
}; defaultEditor = true;
package = pkgs.unstable-pkgs.emacs-unstable-pgtk;
services.lorri.enable = true; };
services.emacs = {
enable = true;
defaultEditor = true;
package = pkgs.unstable-pkgs.emacs-unstable-pgtk;
}; };
home = { home = {
activation.installDoomEmacs = lib.hm.dag.entryAfter ["writeBoundary"] '' activation.installDoomEmacs = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
mkdir ~/.config/emacs -p mkdir ~/.config/emacs -p
chmod u+rw -R ~/.config/emacs chmod u+rw -R ~/.config/emacs
cp -r ${doomemacsSrc}/. "$HOME/.config/emacs" cp -r ${doomemacsSrc}/. "$HOME/.config/emacs"
@ -157,15 +162,17 @@ in {
gcc gcc
imagemagick imagemagick
libtool libtool
nil
nixpkgs-fmt
pandoc pandoc
python311Full python311Full
rcm rcm
(lib.mkIf (config.services.gpg-agent.enable) (lib.mkIf config.services.gpg-agent.enable
pinentry-emacs) pinentry-emacs)
(ripgrep.override {withPCRE2 = true;}) (ripgrep.override { withPCRE2 = true; })
nil
shellcheck shellcheck
shfmt shfmt
statix
texlive.combined.scheme-full texlive.combined.scheme-full
tokei tokei
wget wget

View file

@ -1,8 +1,7 @@
{ { config
config, , lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
@ -67,7 +66,7 @@
search = { search = {
force = true; force = true;
default = "DuckDuckGo"; default = "DuckDuckGo";
order = ["DuckDuckGo" "Nix Packages" "Nix Options" "NixOS Wiki"]; order = [ "DuckDuckGo" "Nix Packages" "Nix Options" "NixOS Wiki" ];
engines = { engines = {
"DuckDuckGo".metaData = { "DuckDuckGo".metaData = {
@ -92,7 +91,7 @@
icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"]; definedAliases = [ "@np" ];
}; };
"Nix Options" = { "Nix Options" = {
urls = [ urls = [
@ -113,7 +112,7 @@
icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@no"]; definedAliases = [ "@no" ];
}; };
"Home-Manager Options" = { "Home-Manager Options" = {
urls = [ urls = [
@ -130,7 +129,7 @@
icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "/run/current-system/sw/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@ho"]; definedAliases = [ "@ho" ];
}; };
"NixOS Wiki" = { "NixOS Wiki" = {
@ -141,7 +140,7 @@
]; ];
iconUpdateURL = "https://nixos.wiki/favicon.png"; iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; updateInterval = 24 * 60 * 60 * 1000;
definedAliases = ["@nw"]; definedAliases = [ "@nw" ];
}; };
"Bing".metaData.hidden = true; "Bing".metaData.hidden = true;
@ -165,7 +164,7 @@
} }
{ {
name = "wikipedia"; name = "wikipedia";
tags = ["wiki"]; tags = [ "wiki" ];
keyword = "wiki"; keyword = "wiki";
url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go"; url = "https://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go";
} }
@ -182,7 +181,7 @@
} }
{ {
name = "wiki"; name = "wiki";
tags = ["wiki" "nix"]; tags = [ "wiki" "nix" ];
url = "https://nixos.wiki/"; url = "https://nixos.wiki/";
} }
{ {

View file

@ -6,23 +6,23 @@
"kaccess"."Toggle Screen Reader On and Off" = "Meta+Alt+S"; "kaccess"."Toggle Screen Reader On and Off" = "Meta+Alt+S";
"kcm_touchpad"."Disable Touchpad" = "Touchpad Off"; "kcm_touchpad"."Disable Touchpad" = "Touchpad Off";
"kcm_touchpad"."Enable Touchpad" = "Touchpad On"; "kcm_touchpad"."Enable Touchpad" = "Touchpad On";
"kcm_touchpad"."Toggle Touchpad" = ["Touchpad Toggle" "Meta+Ctrl+Zenkaku Hankaku"]; "kcm_touchpad"."Toggle Touchpad" = [ "Touchpad Toggle" "Meta+Ctrl+Zenkaku Hankaku" ];
"kded5"."Show System Activity" = "Ctrl+Esc"; "kded5"."Show System Activity" = "Ctrl+Esc";
"kded5"."display" = ["Display" "Meta+P"]; "kded5"."display" = [ "Display" "Meta+P" ];
"kmix"."decrease_microphone_volume" = "Microphone Volume Down"; "kmix"."decrease_microphone_volume" = "Microphone Volume Down";
"kmix"."decrease_volume" = "Volume Down"; "kmix"."decrease_volume" = "Volume Down";
"kmix"."increase_microphone_volume" = "Microphone Volume Up"; "kmix"."increase_microphone_volume" = "Microphone Volume Up";
"kmix"."increase_volume" = "Volume Up"; "kmix"."increase_volume" = "Volume Up";
"kmix"."mic_mute" = ["Microphone Mute" "Meta+Volume Mute"]; "kmix"."mic_mute" = [ "Microphone Mute" "Meta+Volume Mute" ];
"kmix"."mute" = "Volume Mute"; "kmix"."mute" = "Volume Mute";
"ksmserver"."Lock Session" = ["Meta+L" "Screensaver"]; "ksmserver"."Lock Session" = [ "Meta+L" "Screensaver" ];
"ksmserver"."Log Out" = "Ctrl+Alt+Del"; "ksmserver"."Log Out" = "Ctrl+Alt+Del";
"kwin"."Activate Window Demanding Attention" = "Meta+Ctrl+A"; "kwin"."Activate Window Demanding Attention" = "Meta+Ctrl+A";
"kwin"."ClearLastMouseMark" = "Meta+Shift+F12"; "kwin"."ClearLastMouseMark" = "Meta+Shift+F12";
"kwin"."ClearMouseMarks" = "Meta+Shift+F11"; "kwin"."ClearMouseMarks" = "Meta+Shift+F11";
"kwin"."Edit Tiles" = "Meta+T"; "kwin"."Edit Tiles" = "Meta+T";
"kwin"."Expose" = "Ctrl+F9"; "kwin"."Expose" = "Ctrl+F9";
"kwin"."ExposeAll" = ["Ctrl+F10" "Launch (C)"]; "kwin"."ExposeAll" = [ "Ctrl+F10" "Launch (C)" ];
"kwin"."ExposeClass" = "Ctrl+F7"; "kwin"."ExposeClass" = "Ctrl+F7";
"kwin"."Invert" = "Meta+Ctrl+I"; "kwin"."Invert" = "Meta+Ctrl+I";
"kwin"."InvertWindow" = "Meta+Ctrl+U"; "kwin"."InvertWindow" = "Meta+Ctrl+U";
@ -62,7 +62,7 @@
"kwin"."Window to Next Screen" = "Meta+Shift+Right"; "kwin"."Window to Next Screen" = "Meta+Shift+Right";
"kwin"."Window to Previous Screen" = "Meta+Shift+Left"; "kwin"."Window to Previous Screen" = "Meta+Shift+Left";
"kwin"."view_actual_size" = "Meta+0"; "kwin"."view_actual_size" = "Meta+0";
"kwin"."view_zoom_in" = ["Meta++" "Meta+="]; "kwin"."view_zoom_in" = [ "Meta++" "Meta+=" ];
"kwin"."view_zoom_out" = "Meta+-"; "kwin"."view_zoom_out" = "Meta+-";
"mediacontrol"."nextmedia" = "Media Next"; "mediacontrol"."nextmedia" = "Media Next";
"mediacontrol"."pausemedia" = "Media Pause"; "mediacontrol"."pausemedia" = "Media Pause";
@ -72,8 +72,8 @@
"org.kde.dolphin.desktop"."_launch" = "Meta+E"; "org.kde.dolphin.desktop"."_launch" = "Meta+E";
"org.kde.konsole.desktop"."_launch" = "Ctrl+Alt+T"; "org.kde.konsole.desktop"."_launch" = "Ctrl+Alt+T";
"org.kde.krunner.desktop"."RunClipboard" = "Alt+Shift+F2"; "org.kde.krunner.desktop"."RunClipboard" = "Alt+Shift+F2";
"org.kde.krunner.desktop"."_launch" = ["Alt+Space" "Alt+F2" "Search"]; "org.kde.krunner.desktop"."_launch" = [ "Alt+Space" "Alt+F2" "Search" ];
"org.kde.plasma.emojier.desktop"."_launch" = ["Meta+." "Meta+Ctrl+Alt+Shift+Space"]; "org.kde.plasma.emojier.desktop"."_launch" = [ "Meta+." "Meta+Ctrl+Alt+Shift+Space" ];
"org.kde.spectacle.desktop"."ActiveWindowScreenShot" = "Meta+Print"; "org.kde.spectacle.desktop"."ActiveWindowScreenShot" = "Meta+Print";
"org.kde.spectacle.desktop"."FullScreenScreenShot" = "Shift+Print"; "org.kde.spectacle.desktop"."FullScreenScreenShot" = "Shift+Print";
"org.kde.spectacle.desktop"."RectangularRegionScreenShot" = "Meta+Shift+Print"; "org.kde.spectacle.desktop"."RectangularRegionScreenShot" = "Meta+Shift+Print";

View file

@ -1,13 +1,12 @@
{ { config
config, , lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
dconf.settings = { dconf.settings = {
"org/virt-manager/virt-manager/connections" = { "org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"]; autoconnect = [ "qemu:///system" ];
uris = ["qemu:///system"]; uris = [ "qemu:///system" ];
}; };
}; };

View file

@ -1,7 +1,6 @@
{ { config
config, , pkgs
pkgs, , ...
...
}: { }: {
nix = { nix = {
gc = { gc = {
@ -16,8 +15,6 @@
''; '';
}; };
services.fwupd.enable = true;
# locale # locale
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
@ -55,27 +52,29 @@
vim # fallback ed vim # fallback ed
]; ];
# nix convenience programs = {
services.envfs.enable = true; nix-ld.dev.enable = true;
programs.nix-ld.dev.enable = true; command-not-found.enable = false;
programs.command-not-found.enable = false; nix-index-database.comma.enable = true;
programs.nix-index-database.comma.enable = true;
###################
programs.fish.enable = true; fish.enable = true;
programs.gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
};
}; };
services.openssh.enable = true; services = {
fwupd.enable = true;
# For SMB #### envfs.enable = true;
services.gvfs.enable = true;
services.avahi.enable = true; openssh.enable = true;
services.avahi.nssmdns = true;
gvfs.enable = true;
avahi.enable = true;
avahi.nssmdns = true;
};
# netbios dns
networking.firewall.extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns''; networking.firewall.extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns'';
##############
} }

View file

@ -1,8 +1,7 @@
{ { config
config, , lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
programs.dconf.enable = true; programs.dconf.enable = true;
@ -23,53 +22,54 @@
mplus-outline-fonts.githubRelease mplus-outline-fonts.githubRelease
dina-font dina-font
proggyfonts proggyfonts
(nerdfonts.override {fonts = ["FiraCode" "DroidSansMono" "NerdFontsSymbolsOnly"];}) (nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "NerdFontsSymbolsOnly" ]; })
]; ];
# Desktop env services = {
services.xserver = { xserver = {
enable = true; enable = true;
layout = "us"; layout = "us";
xkbVariant = "alt-intl"; xkbVariant = "alt-intl";
desktopManager.plasma5.enable = true; desktopManager.plasma5.enable = true;
displayManager = { displayManager = {
defaultSession = "plasmawayland"; defaultSession = "plasmawayland";
sddm.enable = true; sddm.enable = true;
# autoLogin = { # autoLogin = {
# enable = true; # enable = true;
# user = "tristand"; # user = "tristand";
# }; # };
};
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
#########
## printing
printing = {
enable = true;
drivers = with pkgs; [
gutenprint
gutenprintBin
hplipWithPlugin
brlaser
brgenml1cupswrapper
];
}; };
}; };
#########################
## audio ## audio
sound.enable = true; sound.enable = true;
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
#########
## printing
services.printing.enable = true;
services.printing.drivers = with pkgs; [
gutenprint
gutenprintBin
hplipWithPlugin
brlaser
brgenml1cupswrapper
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cifs-utils cifs-utils

View file

@ -1,8 +1,7 @@
{ { config
config, , lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.nameservers = [ networking.nameservers = [
@ -12,22 +11,24 @@
"2a07:a8c1::#921984.dns.nextdns.io" "2a07:a8c1::#921984.dns.nextdns.io"
]; ];
services.resolved = { services = {
enable = true; resolved = {
dnssec = "true"; enable = true;
domains = ["~."]; dnssec = "true";
fallbackDns = ["1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one"]; domains = [ "~." ];
extraConfig = '' fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
DNSOverTLS=yes extraConfig = ''
''; DNSOverTLS=yes
}; '';
};
services.tailscale = { tailscale = {
enable = true; enable = true;
useRoutingFeatures = "both"; useRoutingFeatures = "both";
}; };
services.mozillavpn = { mozillavpn = {
enable = true; enable = true;
};
}; };
} }

View file

@ -1,8 +1,7 @@
{ { config
config, , lib
lib, , pkgs
pkgs, , ...
...
}: { }: {
environment.systemPackages = with pkgs.unstable-os; [ environment.systemPackages = with pkgs.unstable-os; [
virtiofsd virtiofsd
@ -29,7 +28,7 @@
qemu = { qemu = {
package = pkgs.qemu_kvm; package = pkgs.qemu_kvm;
ovmf.enable = true; ovmf.enable = true;
ovmf.packages = [pkgs.OVMFFull.fd]; ovmf.packages = [ pkgs.OVMFFull.fd ];
swtpm.enable = true; swtpm.enable = true;
runAsRoot = false; runAsRoot = false;
}; };

View file

@ -1,11 +1,10 @@
{ { config
config, , lib
lib, , pkgs
pkgs, , modulesPath
modulesPath, , system
system, , inputs
inputs, , ...
...
}: { }: {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
@ -31,17 +30,17 @@
}; };
initrd = { initrd = {
availableKernelModules = ["amdgpu" "nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod"]; availableKernelModules = [ "amdgpu" "nvme" "xhci_pci" "uas" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = []; kernelModules = [ ];
systemd.enable = true; systemd.enable = true;
}; };
kernelModules = ["kvm-amd" "amdgpu"]; kernelModules = [ "kvm-amd" "amdgpu" ];
extraModulePackages = []; extraModulePackages = [ ];
}; };
services.btrfs.autoScrub.enable = true; services.btrfs.autoScrub.enable = true;
services.xserver.videoDrivers = ["amdgpu"]; services.xserver.videoDrivers = [ "amdgpu" ];
networking = { networking = {
hostName = "nixos-pulse"; hostName = "nixos-pulse";
@ -70,11 +69,29 @@
}; };
}; };
# This manually configures the automatically created network-adresses service to be more flexible systemd = {
# regarding booting without the the device being available on boot services = {
# It prevents slow timeouts & errors on boot while preserving Plug & Play ability # This manually configures the automatically created network-adresses service to be more flexible
systemd.services.network-addresses-enp5s0f4u1u1c2.unitConfig.ConditionPathExists = "/sys/class/net/enp5s0f4u1u1c2"; # regarding booting without the the device being available on boot
systemd.services.network-addresses-enp5s0f4u1u1c2.unitConfig.BindsTo = lib.mkForce null; # It prevents slow timeouts & errors on boot while preserving Plug & Play ability
network-addresses-enp5s0f4u1u1c2.unitConfig = {
ConditionPathExists = "/sys/class/net/enp5s0f4u1u1c2";
BindsTo = lib.mkForce null;
};
powertop.postStart = ''
HIDDEVICES=$(ls /sys/bus/usb/drivers/usbhid | grep -oE '^[0-9]+-[0-9\.]+' | sort -u)
for i in $HIDDEVICES; do
echo -n "Enabling " | cat - /sys/bus/usb/devices/$i/product
echo 'on' > /sys/bus/usb/devices/$i/power/control
done
'';
};
tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
];
};
services.udev.extraRules = '' services.udev.extraRules = ''
ACTION=="add", KERNEL=="enp5s0f4u1u1c2", TAG+="systemd", ENV{SYSTEMD_WANTS}="network-addresses-enp5s0f4u1u1c2.service" ACTION=="add", KERNEL=="enp5s0f4u1u1c2", TAG+="systemd", ENV{SYSTEMD_WANTS}="network-addresses-enp5s0f4u1u1c2.service"
ACTION=="remove", KERNEL=="enp5s0f4u1u1c2", RUN+="${pkgs.systemd}/bin/systemctl stop network-addresses-enp5s0f4u1u1c2.service" ACTION=="remove", KERNEL=="enp5s0f4u1u1c2", RUN+="${pkgs.systemd}/bin/systemctl stop network-addresses-enp5s0f4u1u1c2.service"
@ -82,13 +99,6 @@
# energy saving stuff # energy saving stuff
powerManagement.powertop.enable = true; powerManagement.powertop.enable = true;
systemd.services.powertop.postStart = ''
HIDDEVICES=$(ls /sys/bus/usb/drivers/usbhid | grep -oE '^[0-9]+-[0-9\.]+' | sort -u)
for i in $HIDDEVICES; do
echo -n "Enabling " | cat - /sys/bus/usb/devices/$i/product
echo 'on' > /sys/bus/usb/devices/$i/power/control
done
'';
hardware = { hardware = {
tuxedo-control-center = { tuxedo-control-center = {
@ -107,9 +117,5 @@
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}; };
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.hip}"
];
zramSwap.enable = true; zramSwap.enable = true;
} }

View file

@ -18,9 +18,9 @@
content = { content = {
type = "luks"; type = "luks";
name = "crypted_0"; name = "crypted_0";
extraOpenArgs = ["--allow-discards"]; extraOpenArgs = [ "--allow-discards" ];
passwordFile = "/tmp/secret.key"; passwordFile = "/tmp/secret.key";
additionalKeyFiles = []; additionalKeyFiles = [ ];
# content is empty here as the btrfs partition will be created via extraArgs of the cryptroot_1 partition def # content is empty here as the btrfs partition will be created via extraArgs of the cryptroot_1 partition def
}; };
}; };
@ -29,9 +29,9 @@
content = { content = {
type = "luks"; type = "luks";
name = "crypted_swap_0"; name = "crypted_swap_0";
extraOpenArgs = ["--allow-discards"]; extraOpenArgs = [ "--allow-discards" ];
passwordFile = "/tmp/secret.key"; passwordFile = "/tmp/secret.key";
additionalKeyFiles = []; additionalKeyFiles = [ ];
content = { content = {
type = "swap"; type = "swap";
}; };
@ -65,9 +65,9 @@
content = { content = {
type = "luks"; type = "luks";
name = "crypted_1"; name = "crypted_1";
extraOpenArgs = ["--allow-discards"]; extraOpenArgs = [ "--allow-discards" ];
passwordFile = "/tmp/secret.key"; passwordFile = "/tmp/secret.key";
additionalKeyFiles = []; additionalKeyFiles = [ ];
content = { content = {
# this partiton needs to be in the last parent part alphabetically to ensure the referenced /crypted_0 dev already exists # this partiton needs to be in the last parent part alphabetically to ensure the referenced /crypted_0 dev already exists
type = "btrfs"; type = "btrfs";
@ -79,18 +79,18 @@
"/dev/mapper/crypted_0" "/dev/mapper/crypted_0"
]; ];
subvolumes = { subvolumes = {
"/_active" = {}; "/_active" = { };
"/_active/root" = { "/_active/root" = {
mountpoint = "/"; mountpoint = "/";
mountOptions = ["compress=zstd" "noatime"]; mountOptions = [ "compress=zstd" "noatime" ];
}; };
"/_active/home" = { "/_active/home" = {
mountpoint = "/home"; mountpoint = "/home";
mountOptions = ["compress=zstd" "relatime"]; mountOptions = [ "compress=zstd" "relatime" ];
}; };
"/_active/nix" = { "/_active/nix" = {
mountpoint = "/nix"; mountpoint = "/nix";
mountOptions = ["compress=zstd" "noatime"]; mountOptions = [ "compress=zstd" "noatime" ];
}; };
}; };
}; };
@ -101,9 +101,9 @@
content = { content = {
type = "luks"; type = "luks";
name = "crypted_swap_1"; name = "crypted_swap_1";
extraOpenArgs = ["--allow-discards"]; extraOpenArgs = [ "--allow-discards" ];
passwordFile = "/tmp/secret.key"; passwordFile = "/tmp/secret.key";
additionalKeyFiles = []; additionalKeyFiles = [ ];
content = { content = {
type = "swap"; type = "swap";
resumeDevice = true; resumeDevice = true;

View file

@ -1,14 +1,13 @@
{ { pkgs
pkgs, , config
config, , inputs
inputs, , system
system, , ...
...
}: { }: {
users.users.tester = { users.users.tester = {
isNormalUser = true; isNormalUser = true;
description = "Testa Test"; description = "Testa Test";
extraGroups = ["docker" "networkmanager" "wheel" "libvirtd" "qemu-libvirtd"]; extraGroups = [ "docker" "networkmanager" "wheel" "libvirtd" "qemu-libvirtd" ];
shell = pkgs.fish; shell = pkgs.fish;
home = "/home/tester"; home = "/home/tester";
hashedPassword = "$6$YJT50/Za3FSFQuNT$0orD1URwoURoRKO9sIAsUiIHxOtEOjmPXn5Mp7vAmIYlgVmI629qS7YPUInmztEtEorRpkSMbV3.fCy9NQhKX."; hashedPassword = "$6$YJT50/Za3FSFQuNT$0orD1URwoURoRKO9sIAsUiIHxOtEOjmPXn5Mp7vAmIYlgVmI629qS7YPUInmztEtEorRpkSMbV3.fCy9NQhKX.";
@ -16,7 +15,7 @@
users.users.tristand = { users.users.tristand = {
isNormalUser = true; isNormalUser = true;
description = "Tristan Druyen"; description = "Tristan Druyen";
extraGroups = ["docker" "networkmanager" "wheel" "libvirtd" "qemu-libvirtd"]; extraGroups = [ "docker" "networkmanager" "wheel" "libvirtd" "qemu-libvirtd" ];
shell = pkgs.fish; shell = pkgs.fish;
home = "/home/tristand"; home = "/home/tristand";
hashedPassword = "$6$Wj.XY8JgH5EWuog4$HnbtPJXDEqKXFrzkPVEjih3PytcpBCrkfL7TAwkXd0IFced7kGMlZNliNsAqQ3XqfyUzAYiiKTIqoPVJEk.s.."; hashedPassword = "$6$Wj.XY8JgH5EWuog4$HnbtPJXDEqKXFrzkPVEjih3PytcpBCrkfL7TAwkXd0IFced7kGMlZNliNsAqQ3XqfyUzAYiiKTIqoPVJEk.s..";

View file

@ -1,16 +1,17 @@
{ { pkgs
pkgs, , config
config, , inputs
inputs, , system
system, , ...
... }:
}: let let
wallpaper = inputs.nix-wallpaper.packages.${pkgs.system}.default.override { wallpaper = inputs.nix-wallpaper.packages.${pkgs.system}.default.override {
logoSize = 24; logoSize = 24;
preset = "gruvbox-dark-rainbow"; preset = "gruvbox-dark-rainbow";
}; };
wallpaperPath = "${wallpaper}/share/wallpapers/nixos-wallpaper.png"; wallpaperPath = "${wallpaper}/share/wallpapers/nixos-wallpaper.png";
in { in
{
imports = [ imports = [
../home-mods/dev ../home-mods/dev
../home-mods/firefox ../home-mods/firefox
@ -18,31 +19,32 @@ in {
../home-mods/virt ../home-mods/virt
]; ];
home.file.".background".source = wallpaperPath; home = {
home.username = "tester"; file.".background".source = wallpaperPath;
home.homeDirectory = "/home/tester"; username = "tester";
homeDirectory = "/home/tester";
home.packages = with pkgs.unstable-pkgs; [ packages = with pkgs.unstable-pkgs; [
bitwarden bitwarden
brave brave
btop btop
cavalier cavalier
freetube freetube
imagemagick imagemagick
inkscape inkscape
jellyfin-media-player jellyfin-media-player
kate kate
neofetch neofetch
nextcloud-client nextcloud-client
onlyoffice-bin onlyoffice-bin
rust-motd rust-motd
rustdesk rustdesk
tutanota-desktop tutanota-desktop
signal-desktop signal-desktop
statix thunderbird
thunderbird zellij
zellij ];
];
home.stateVersion = "23.05"; stateVersion = "23.05";
};
} }

View file

@ -1,16 +1,17 @@
{ { pkgs
pkgs, , config
config, , inputs
inputs, , system
system, , ...
... }:
}: let let
wallpaper = inputs.nix-wallpaper.packages.${pkgs.system}.default.override { wallpaper = inputs.nix-wallpaper.packages.${pkgs.system}.default.override {
logoSize = 24; logoSize = 24;
preset = "gruvbox-dark-rainbow"; preset = "gruvbox-dark-rainbow";
}; };
wallpaperPath = "${wallpaper}/share/wallpapers/nixos-wallpaper.png"; wallpaperPath = "${wallpaper}/share/wallpapers/nixos-wallpaper.png";
in { in
{
imports = [ imports = [
../home-mods/dev ../home-mods/dev
../home-mods/firefox ../home-mods/firefox
@ -18,31 +19,32 @@ in {
../home-mods/virt ../home-mods/virt
]; ];
home.file.".background".source = wallpaperPath; home = {
home.username = "tristand"; file.".background".source = wallpaperPath;
home.homeDirectory = "/home/tristand"; username = "tristand";
homeDirectory = "/home/tristand";
home.packages = with pkgs.unstable-pkgs; [ packages = with pkgs.unstable-pkgs; [
bitwarden bitwarden
brave brave
btop btop
cavalier cavalier
freetube freetube
imagemagick imagemagick
inkscape inkscape
jellyfin-media-player jellyfin-media-player
kate kate
neofetch neofetch
nextcloud-client nextcloud-client
onlyoffice-bin onlyoffice-bin
rust-motd rust-motd
rustdesk rustdesk
tutanota-desktop tutanota-desktop
signal-desktop signal-desktop
statix thunderbird
thunderbird zellij
zellij ];
];
home.stateVersion = "23.05"; stateVersion = "23.05";
};
} }