split config
This commit is contained in:
parent
1602292781
commit
5944fe5cca
19 changed files with 271 additions and 276 deletions
19
flake.nix
19
flake.nix
|
|
@ -16,16 +16,21 @@
|
|||
home-manager,
|
||||
lix-module,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
common-modules = [
|
||||
lix-module.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
./common
|
||||
];
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
vinzenz-lpt2 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
lix-module.nixosModules.default
|
||||
home-manager.nixosModules.home-manager
|
||||
./common
|
||||
./hosts/vinzenz-lpt2
|
||||
];
|
||||
modules =
|
||||
common-modules
|
||||
++ [
|
||||
./hosts/vinzenz-lpt2
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
104
home/gnome.nix
Normal file
104
home/gnome.nix
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../modules/gnome.nix
|
||||
];
|
||||
config = {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
amberol
|
||||
gitg
|
||||
gnome-builder
|
||||
meld
|
||||
simple-scan
|
||||
pinta
|
||||
]
|
||||
++ (with gnome; [
|
||||
dconf-editor
|
||||
gpaste
|
||||
|
||||
# graphical installer for flatpak apps
|
||||
gnome-software
|
||||
])
|
||||
++ (with gnomeExtensions; [
|
||||
caffeine
|
||||
appindicator
|
||||
gsconnect
|
||||
battery-health-charging
|
||||
quick-settings-tweaker
|
||||
solaar-extension
|
||||
]);
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
clock-show-seconds = true;
|
||||
show-battery-percentage = true;
|
||||
};
|
||||
"org/gnome/mutter" = {
|
||||
edge-tiling = true;
|
||||
dynamic-workspaces = true;
|
||||
};
|
||||
"org/gnome/desktop/peripherals/keyboard" = {
|
||||
numlock-state = true;
|
||||
};
|
||||
"org/gnome/desktop/peripherals/touchpad" = {
|
||||
tap-to-click = true;
|
||||
two-finger-scrolling-enabled = true;
|
||||
};
|
||||
"org/gnome/tweaks" = {
|
||||
show-extensions-notice = false;
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
disabled-extensions = [];
|
||||
enabled-extensions = [
|
||||
"appindicatorsupport@rgcjonas.gmail.com"
|
||||
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
|
||||
"caffeine@patapon.info"
|
||||
"GPaste@gnome-shell-extensions.gnome.org"
|
||||
"gsconnect@andyholmes.github.io"
|
||||
"solaar-extension@sidevesh"
|
||||
];
|
||||
};
|
||||
"ca/desrt/dconf-editor" = {
|
||||
show-warning = false;
|
||||
};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
switch-windows = ["<Alt>Tab"];
|
||||
switch-windows-backward = ["<Shift><Alt>Tab"];
|
||||
switch-applications = ["<Super>Tab"];
|
||||
switch-applications-backward = ["<Shift><Super>Tab"];
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme.name = "Adwaita";
|
||||
cursorTheme.name = "Adwaita";
|
||||
theme = {
|
||||
name = "adw-gtk3-dark";
|
||||
package = pkgs.adw-gtk3;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
trayscale
|
||||
]
|
||||
++ (with gnomeExtensions; [
|
||||
tailscale-qs
|
||||
]);
|
||||
dconf.settings."org/gnome/shell".enabled-extensions = ["tailscale@joaophi.github.com"];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home .packages = with pkgs; [
|
||||
home.packages = with pkgs; [
|
||||
## Apps
|
||||
telegram-desktop
|
||||
kdiff3
|
||||
|
|
|
|||
|
|
@ -1,248 +0,0 @@
|
|||
{
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
isGnomeEnabled = osConfig.my.desktop.enableGnome;
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
keepassxc
|
||||
insync
|
||||
|
||||
telegram-desktop
|
||||
element-desktop
|
||||
|
||||
wireguard-tools
|
||||
wirelesstools
|
||||
|
||||
alejandra # nix formatter
|
||||
|
||||
arduino
|
||||
uucp
|
||||
|
||||
kdiff3
|
||||
jetbrains-toolbox
|
||||
];
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
fzf.enable = true;
|
||||
|
||||
zsh = {
|
||||
initExtra = ''
|
||||
eval "$(direnv hook zsh)";
|
||||
export PATH=$PATH:/home/vinzenz/.cargo/bin
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
my-apply = "sudo nixos-rebuild boot";
|
||||
my-switch = "sudo nixos-rebuild switch";
|
||||
my-update = "sudo nixos-rebuild boot --upgrade";
|
||||
my-pull = "git -C ~/Repos/nixos-configuration pull --rebase";
|
||||
my-fmt = "alejandra .";
|
||||
my-test = "sudo nixos-rebuild test";
|
||||
my-direnvallow = "echo \"use nix\" > .envrc && direnv allow";
|
||||
my-ip4 = "ip addr show | grep 192";
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
expireDuplicatesFirst = true;
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "agnoster";
|
||||
plugins = ["git" "sudo" "docker" "systemadmin"];
|
||||
};
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Vinzenz Schroeter";
|
||||
userEmail = "vinzenz.f.s@gmail.com";
|
||||
|
||||
aliases = {
|
||||
prettylog = "log --pretty=oneline --graph";
|
||||
spring-clean = "!git branch --merged | xargs -n 1 -r git branch -d";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
pull.ff = "only";
|
||||
merge.tool = "kdiff3";
|
||||
push.autoSetupRemote = "true";
|
||||
};
|
||||
};
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
enableUpdateCheck = false;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
bbenoist.nix
|
||||
ms-python.python
|
||||
kamadorueda.alejandra
|
||||
editorconfig.editorconfig
|
||||
yzhang.markdown-all-in-one
|
||||
redhat.vscode-yaml
|
||||
pkief.material-icon-theme
|
||||
mhutchie.git-graph
|
||||
rust-lang.rust-analyzer
|
||||
tamasfe.even-better-toml
|
||||
llvm-vs-code-extensions.vscode-clangd
|
||||
mkhl.direnv
|
||||
vadimcn.vscode-lldb
|
||||
ms-dotnettools.csharp
|
||||
];
|
||||
userSettings = {
|
||||
"git.autofetch" = true;
|
||||
"update.mode" = "none";
|
||||
"editor.fontFamily" = "'Fira Code', 'Droid Sans Mono', 'monospace', monospace";
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.formatOnSaveMode" = "modificationsIfAvailable";
|
||||
"editor.minimap.autohide" = true;
|
||||
"diffEditor.diffAlgorithm" = "advanced";
|
||||
"explorer.excludeGitIgnore" = true;
|
||||
"markdown.extension.tableFormatter.normalizeIndentation" = true;
|
||||
"markdown.extension.toc.orderedList" = false;
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
"redhat.telemetry.enabled" = false;
|
||||
"workbench.startupEditor" = "readme";
|
||||
"workbench.enableExperiments" = false;
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
"rust-analyzer.checkOnSave.command" = "clippy";
|
||||
"extensions.autoUpdate" = false;
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"\[makefile\]" = {
|
||||
"editor.insertSpaces" = false;
|
||||
"editor.detectIndentation" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
chromium = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
{
|
||||
# ublock origin
|
||||
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
|
||||
}
|
||||
{
|
||||
id = "dcpihecpambacapedldabdbpakmachpb";
|
||||
updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
git = true;
|
||||
icons = true;
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--header"
|
||||
];
|
||||
};
|
||||
|
||||
# checked https://rycee.gitlab.io/home-manager/options.html until "programs.notmuch"
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"vpn1" = {
|
||||
host = "vpn1 hetzner-vpn1";
|
||||
hostname = "157.90.146.125"; # 2a01:4f8:c012:7137::/64
|
||||
user = "root";
|
||||
};
|
||||
"vpn1-ts" = {
|
||||
host = "vpn1-ts hetzner-vpn1.donkey-pentatonic.ts.net";
|
||||
hostname = "hetzner-vpn1.donkey-pentatonic.ts.net";
|
||||
user = "root";
|
||||
};
|
||||
"openwrt" = {
|
||||
host = "openwrt openwrt.lan";
|
||||
hostname = "openwrt.lan";
|
||||
user = "root";
|
||||
};
|
||||
"openwrt-ts" = {
|
||||
hostname = "openwrt.donkey-pentatonic.ts.net";
|
||||
port = 2222;
|
||||
user = "root";
|
||||
};
|
||||
"openwrt-j" = {
|
||||
hostname = "openwrt.donkey-pentatonic.ts.net";
|
||||
proxyJump = "vpn1";
|
||||
port = 2222;
|
||||
user = "root";
|
||||
};
|
||||
"pc2-power" = {
|
||||
hostname = "openwrt.donkey-pentatonic.ts.net";
|
||||
proxyJump = "vpn1";
|
||||
port = 2222;
|
||||
user = "pc2-power";
|
||||
};
|
||||
"avd-power" = {
|
||||
# hostname = "2001:678:560:23:9833:63ff:fe2d:f477"
|
||||
# hostname = "195.160.172.25";
|
||||
hostname = "avd-jumphost.club.berlin.ccc.de";
|
||||
user = "power";
|
||||
};
|
||||
"avd" = {
|
||||
hostname = "avd.club.berlin.ccc.de";
|
||||
user = "vinzenz";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
editorconfig = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"*" = {
|
||||
charset = "utf-8";
|
||||
end_of_line = "lf";
|
||||
trim_trailing_whitespace = true;
|
||||
insert_final_newline = true;
|
||||
max_line_width = 120;
|
||||
indent_style = "space";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.nix" = {
|
||||
indent_size = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.file."policy.json" = {
|
||||
target = ".config/containers/policy.json";
|
||||
text = ''
|
||||
{
|
||||
"default": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
],
|
||||
"transports":
|
||||
{
|
||||
"docker-daemon":
|
||||
{
|
||||
"": [{"type":"insecureAcceptAnything"}]
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
]
|
||||
104
home/vinzenz/default.nix
Normal file
104
home/vinzenz/default.nix
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
inputs @ {
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
isGnomeEnabled = osConfig.my.desktop.enableGnome;
|
||||
in {
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
fzf.enable = true;
|
||||
zsh = import ./zsh.nix inputs;
|
||||
git = import ./git.nix;
|
||||
vscode = import ./vscode.nix inputs;
|
||||
ssh = import ./ssh.nix;
|
||||
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
chromium = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
{
|
||||
# ublock origin
|
||||
id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";
|
||||
}
|
||||
{
|
||||
id = "dcpihecpambacapedldabdbpakmachpb";
|
||||
updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
eza = {
|
||||
enable = true;
|
||||
git = true;
|
||||
icons = true;
|
||||
extraOptions = [
|
||||
"--group-directories-first"
|
||||
"--header"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
keepassxc
|
||||
insync
|
||||
|
||||
telegram-desktop
|
||||
element-desktop
|
||||
|
||||
wireguard-tools
|
||||
wirelesstools
|
||||
|
||||
alejandra # nix formatter
|
||||
|
||||
arduino
|
||||
uucp
|
||||
|
||||
kdiff3
|
||||
jetbrains-toolbox
|
||||
];
|
||||
|
||||
editorconfig = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"*" = {
|
||||
charset = "utf-8";
|
||||
end_of_line = "lf";
|
||||
trim_trailing_whitespace = true;
|
||||
insert_final_newline = true;
|
||||
max_line_width = 120;
|
||||
indent_style = "space";
|
||||
indent_size = 4;
|
||||
};
|
||||
"*.nix" = {
|
||||
indent_size = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.file."policy.json" = {
|
||||
target = ".config/containers/policy.json";
|
||||
text = ''
|
||||
{
|
||||
"default": [
|
||||
{
|
||||
"type": "insecureAcceptAnything"
|
||||
}
|
||||
],
|
||||
"transports":
|
||||
{
|
||||
"docker-daemon":
|
||||
{
|
||||
"": [{"type":"insecureAcceptAnything"}]
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
16
home/vinzenz/git.nix
Normal file
16
home/vinzenz/git.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
enable = true;
|
||||
userName = "Vinzenz Schroeter";
|
||||
userEmail = "vinzenz.f.s@gmail.com";
|
||||
|
||||
aliases = {
|
||||
prettylog = "log --pretty=oneline --graph";
|
||||
spring-clean = "!git branch --merged | xargs -n 1 -r git branch -d";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
pull.ff = "only";
|
||||
merge.tool = "kdiff3";
|
||||
push.autoSetupRemote = "true";
|
||||
};
|
||||
}
|
||||
47
home/vinzenz/ssh.nix
Normal file
47
home/vinzenz/ssh.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"vpn1" = {
|
||||
host = "vpn1 hetzner-vpn1";
|
||||
hostname = "157.90.146.125"; # 2a01:4f8:c012:7137::/64
|
||||
user = "root";
|
||||
};
|
||||
"vpn1-ts" = {
|
||||
host = "vpn1-ts hetzner-vpn1.donkey-pentatonic.ts.net";
|
||||
hostname = "hetzner-vpn1.donkey-pentatonic.ts.net";
|
||||
user = "root";
|
||||
};
|
||||
"openwrt" = {
|
||||
host = "openwrt openwrt.lan";
|
||||
hostname = "openwrt.lan";
|
||||
user = "root";
|
||||
};
|
||||
"openwrt-ts" = {
|
||||
hostname = "openwrt.donkey-pentatonic.ts.net";
|
||||
port = 2222;
|
||||
user = "root";
|
||||
};
|
||||
"openwrt-j" = {
|
||||
hostname = "openwrt.donkey-pentatonic.ts.net";
|
||||
proxyJump = "vpn1";
|
||||
port = 2222;
|
||||
user = "root";
|
||||
};
|
||||
"pc2-power" = {
|
||||
hostname = "openwrt.donkey-pentatonic.ts.net";
|
||||
proxyJump = "vpn1";
|
||||
port = 2222;
|
||||
user = "pc2-power";
|
||||
};
|
||||
"avd-power" = {
|
||||
# hostname = "2001:678:560:23:9833:63ff:fe2d:f477"
|
||||
# hostname = "195.160.172.25";
|
||||
hostname = "avd-jumphost.club.berlin.ccc.de";
|
||||
user = "power";
|
||||
};
|
||||
"avd" = {
|
||||
hostname = "avd.club.berlin.ccc.de";
|
||||
user = "vinzenz";
|
||||
};
|
||||
};
|
||||
}
|
||||
46
home/vinzenz/vscode.nix
Normal file
46
home/vinzenz/vscode.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{pkgs, ...}: {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
enableUpdateCheck = false;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
bbenoist.nix
|
||||
ms-python.python
|
||||
kamadorueda.alejandra
|
||||
editorconfig.editorconfig
|
||||
yzhang.markdown-all-in-one
|
||||
redhat.vscode-yaml
|
||||
pkief.material-icon-theme
|
||||
mhutchie.git-graph
|
||||
rust-lang.rust-analyzer
|
||||
tamasfe.even-better-toml
|
||||
llvm-vs-code-extensions.vscode-clangd
|
||||
mkhl.direnv
|
||||
vadimcn.vscode-lldb
|
||||
ms-dotnettools.csharp
|
||||
];
|
||||
userSettings = {
|
||||
"git.autofetch" = true;
|
||||
"update.mode" = "none";
|
||||
"editor.fontFamily" = "'Fira Code', 'Droid Sans Mono', 'monospace', monospace";
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.formatOnSaveMode" = "modificationsIfAvailable";
|
||||
"editor.minimap.autohide" = true;
|
||||
"diffEditor.diffAlgorithm" = "advanced";
|
||||
"explorer.excludeGitIgnore" = true;
|
||||
"markdown.extension.tableFormatter.normalizeIndentation" = true;
|
||||
"markdown.extension.toc.orderedList" = false;
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
"redhat.telemetry.enabled" = false;
|
||||
"workbench.startupEditor" = "readme";
|
||||
"workbench.enableExperiments" = false;
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
"rust-analyzer.checkOnSave.command" = "clippy";
|
||||
"extensions.autoUpdate" = false;
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"\[makefile\]" = {
|
||||
"editor.insertSpaces" = false;
|
||||
"editor.detectIndentation" = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
29
home/vinzenz/zsh.nix
Normal file
29
home/vinzenz/zsh.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{config, ...}: {
|
||||
initExtra = ''
|
||||
eval "$(direnv hook zsh)";
|
||||
export PATH=$PATH:/home/vinzenz/.cargo/bin
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
my-apply = "sudo nixos-rebuild boot";
|
||||
my-switch = "sudo nixos-rebuild switch";
|
||||
my-update = "sudo nixos-rebuild boot --upgrade";
|
||||
my-pull = "git -C ~/Repos/nixos-configuration pull --rebase";
|
||||
my-fmt = "alejandra .";
|
||||
my-test = "sudo nixos-rebuild test";
|
||||
my-direnvallow = "echo \"use nix\" > .envrc && direnv allow";
|
||||
my-ip4 = "ip addr show | grep 192";
|
||||
};
|
||||
|
||||
history = {
|
||||
size = 10000;
|
||||
path = "${config.xdg.dataHome}/zsh/history";
|
||||
expireDuplicatesFirst = true;
|
||||
};
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "agnoster";
|
||||
plugins = ["git" "sudo" "docker" "systemadmin"];
|
||||
};
|
||||
}
|
||||
|
|
@ -3,4 +3,7 @@
|
|||
./hardware.nix
|
||||
./environment.nix
|
||||
];
|
||||
config = {
|
||||
networking.hostName = "vinzenz-lpt2";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
../../home
|
||||
../../home/gnome-home.nix
|
||||
../../home/gnome.nix
|
||||
../../users/vinzenz.nix
|
||||
../desktop-environment.nix
|
||||
../gnome.nix
|
||||
../gaming.nix
|
||||
../printing.nix
|
||||
../latex.nix
|
||||
../../modules/desktop-environment.nix
|
||||
../../modules/gnome.nix
|
||||
../../modules/gaming.nix
|
||||
../../modules/printing.nix
|
||||
../../modules/latex.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
home-manager.users.vinzenz = import ../../home/vinzenz-home.nix;
|
||||
home-manager.users.vinzenz = import ../../home/vinzenz;
|
||||
|
||||
virtualisation = {
|
||||
containers.enable = true;
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
...
|
||||
}: {
|
||||
imports = [
|
||||
../desktop-hardware.nix
|
||||
../intel-graphics.nix
|
||||
../../modules/desktop-hardware.nix
|
||||
../../modules/intel-graphics.nix
|
||||
];
|
||||
config = {
|
||||
# intel cpu
|
||||
|
|
|
|||
129
modules/desktop-environment.nix
Normal file
129
modules/desktop-environment.nix
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
services = {
|
||||
xserver.enable = true;
|
||||
libinput.enable = true;
|
||||
flatpak.enable = true;
|
||||
fstrim.enable = true;
|
||||
earlyoom = {
|
||||
enable = true;
|
||||
freeMemThreshold = 5;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
#jack.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
kdeconnect.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
languagePacks = ["en-US" "de"];
|
||||
};
|
||||
nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
stdenv.cc.cc
|
||||
zlib
|
||||
zstd
|
||||
curl
|
||||
openssl
|
||||
attr
|
||||
libssh
|
||||
bzip2
|
||||
libxml2
|
||||
acl
|
||||
libsodium
|
||||
util-linux
|
||||
xz
|
||||
systemd
|
||||
];
|
||||
};
|
||||
appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
|
||||
firewall = {
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
# KDE Connect / gsconnect
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
# KDE Connect / gsconnect
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
# save some boot time because nothing actually requires network connectivity
|
||||
services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
# prevent stuck units from preventing shutdown (default is 120s)
|
||||
extraConfig = ''
|
||||
DefaultTimeoutStopSec=12s
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
lm_sensors
|
||||
|
||||
# office
|
||||
libreoffice-qt
|
||||
hunspell
|
||||
hunspellDicts.de-de
|
||||
hunspellDicts.en-us-large
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [];
|
||||
|
||||
my.allowUnfreePackages = [
|
||||
"insync"
|
||||
"insync-pkg"
|
||||
|
||||
"rider"
|
||||
"pycharm-professional"
|
||||
"jetbrains-toolbox"
|
||||
|
||||
"anydesk"
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
fontconfig.defaultFonts.monospace = ["FiraCode Nerd Font"];
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["FiraCode"];})
|
||||
];
|
||||
};
|
||||
|
||||
hardware.logitech.wireless = {
|
||||
enable = true;
|
||||
enableGraphical = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
44
modules/desktop-hardware.nix
Normal file
44
modules/desktop-hardware.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
kernelParams = ["quiet" "udev.log_level=3"];
|
||||
supportedFilesystems = ["btrfs"];
|
||||
initrd.supportedFilesystems = ["btrfs"];
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
plymouth.enable = true;
|
||||
loader = {
|
||||
timeout = 3;
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
editor = false; # do not allow changing kernel parameters
|
||||
consoleMode = "max";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
hardware = {
|
||||
enableRedistributableFirmware = true;
|
||||
bluetooth.enable = true;
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
services.fwupd.enable = true;
|
||||
};
|
||||
}
|
||||
52
modules/gaming.nix
Normal file
52
modules/gaming.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
hardware = {
|
||||
opengl = {
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [mangohud];
|
||||
extraPackages32 = with pkgs; [mangohud];
|
||||
};
|
||||
|
||||
steam-hardware.enable = true;
|
||||
xpadneo.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wineWowPackages.stagingFull
|
||||
wineWowPackages.fonts
|
||||
winetricks
|
||||
dxvk
|
||||
mangohud
|
||||
vulkan-tools
|
||||
glxinfo
|
||||
lutris
|
||||
];
|
||||
|
||||
programs = {
|
||||
xwayland.enable = true;
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
gamemode.enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
# Factorio
|
||||
34197
|
||||
];
|
||||
|
||||
my.allowUnfreePackages = [
|
||||
"steam"
|
||||
"steam-original"
|
||||
"steam-run"
|
||||
];
|
||||
};
|
||||
}
|
||||
50
modules/gnome.nix
Normal file
50
modules/gnome.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
services = {
|
||||
xserver = {
|
||||
# Enable the GNOME Desktop Environment.
|
||||
desktopManager.gnome.enable = true;
|
||||
displayManager = {
|
||||
gdm.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
displayManager.defaultSession = "gnome";
|
||||
|
||||
gnome = {
|
||||
tracker-miners.enable = false;
|
||||
tracker.enable = false;
|
||||
sushi.enable = true;
|
||||
gnome-remote-desktop.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
gpaste.enable = true;
|
||||
kdeconnect.package = pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
|
||||
# remove some gnome default apps
|
||||
environment.gnome.excludePackages = with pkgs.gnome; [
|
||||
cheese # photo booth
|
||||
epiphany # web browser
|
||||
evince # document viewer
|
||||
geary # email client
|
||||
gnome-maps
|
||||
gnome-weather
|
||||
gnome-music
|
||||
pkgs.gnome-tour
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [gnome.ghex impression];
|
||||
|
||||
# RDP connections
|
||||
networking.firewall.allowedTCPPorts = [3389];
|
||||
};
|
||||
}
|
||||
28
modules/intel-graphics.nix
Normal file
28
modules/intel-graphics.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
hardware.opengl = {
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
intel-ocl
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
intel-media-driver
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvtopPackages.intel
|
||||
];
|
||||
my.allowUnfreePackages = ["intel-ocl"];
|
||||
};
|
||||
}
|
||||
14
modules/latex.nix
Normal file
14
modules/latex.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
environment.systemPackages = with pkgs; [
|
||||
fontconfig
|
||||
texliveFull
|
||||
texstudio
|
||||
];
|
||||
};
|
||||
}
|
||||
19
modules/printing.nix
Normal file
19
modules/printing.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
services = {
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
|
||||
avahi = {
|
||||
enable = true; # runs the Avahi daemon
|
||||
nssmdns4 = true; # enables the mDNS NSS plug-in
|
||||
openFirewall = true; # opens the firewall for UDP port 5353
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in a new issue