From 3a7d1784fa32dfb2050fdf610df8c991c374459a Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 13:36:21 +0200 Subject: [PATCH 01/12] wip create meta configuration --- gnome.nix | 49 ------- home-ronja.nix | 119 ----------------- home-vinzenz.nix | 233 --------------------------------- kde.nix | 50 ------- common.nix => my/default.nix | 11 +- my/gnome.nix | 59 +++++++++ my/home-ronja.nix | 129 +++++++++++++++++++ my/home-vinzenz.nix | 243 +++++++++++++++++++++++++++++++++++ my/kde.nix | 60 +++++++++ vinzenz-lpt.nix | 9 +- vinzenz-pc3.nix | 2 +- 11 files changed, 506 insertions(+), 458 deletions(-) delete mode 100644 gnome.nix delete mode 100644 home-ronja.nix delete mode 100644 home-vinzenz.nix delete mode 100644 kde.nix rename common.nix => my/default.nix (95%) create mode 100644 my/gnome.nix create mode 100644 my/home-ronja.nix create mode 100644 my/home-vinzenz.nix create mode 100644 my/kde.nix diff --git a/gnome.nix b/gnome.nix deleted file mode 100644 index bc6aa4d..0000000 --- a/gnome.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - config, - pkgs, - ... -}: { - services = { - xserver = { - # Enable the GNOME Desktop Environment. - displayManager.gdm.enable = true; - desktopManager.gnome.enable = true; - }; - - gnome = { - tracker-miners.enable = false; - tracker.enable = false; - }; - }; - - environment.systemPackages = [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 - seahorse # password manager - gnome-clocks - gnome-maps - gnome-weather - gnome-music - pkgs.gnome-connections - ]; - - home-manager.users = { - vinzenz = {pkgs, ...}: { - home.packages = with pkgs; [ - gnome.gpaste - amberol - ]; - - dconf.settings = { - "org/gnome/desktop/peripherals/keyboard" = { - numlock-state = true; - }; - }; - }; - }; -} diff --git a/home-ronja.nix b/home-ronja.nix deleted file mode 100644 index 7bb3e87..0000000 --- a/home-ronja.nix +++ /dev/null @@ -1,119 +0,0 @@ -{ - config, - pkgs, - ... -}: { - # Define user account - users.users.ronja = { - isNormalUser = true; - description = "Ronja Spiegelberg"; - extraGroups = ["networkmanager" "wheel"]; - shell = pkgs.zsh; - }; - - # home manager - home-manager.useUserPackages = true; - home-manager.useGlobalPkgs = true; - home-manager.users.ronja = { - config, - pkgs, - ... - }: { - home = { - username = "ronja"; - homeDirectory = "/home/ronja"; - stateVersion = "22.11"; - - sessionVariables = { - EDITOR = "nano"; - }; - - packages = with pkgs; [ - ## Apps - steam - telegram-desktop - powerline - powerline-fonts - lutris - kdiff3 - wineWowPackages.stagingFull - wineWowPackages.fonts - winetricks - - (lutris.override { - extraPkgs = pkgs: [ - # List package dependencies here - ]; - extraLibraries = pkgs: [ - # List library dependencies here - ]; - }) - ]; - - file.".nanorc".text = '' - set linenumbers - set mouse - ''; - }; - - programs = { - home-manager.enable = true; - - firefox.enable = true; - command-not-found.enable = true; - dircolors.enable = true; - htop.enable = true; - - zsh = { - enable = true; - - enableSyntaxHighlighting = true; - enableAutosuggestions = true; - enableVteIntegration = true; - - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - expireDuplicatesFirst = true; - }; - - oh-my-zsh = { - enable = true; - theme = "agnoster"; - plugins = ["git" "sudo" "systemadmin"]; - }; - }; - - git = { - enable = true; - userName = "Ronja Spiegelberg"; - userEmail = "ronja.spiegelberg@gmail.com"; - - extraConfig = { - pull.ff = "only"; - init.defaultBranch = "main"; - merge.tool = "kdiff3"; - }; - }; - - gh = { - enable = true; - enableGitCredentialHelper = true; - }; - - chromium = { - enable = true; - extensions = [ - { - # ublock origin - id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; - } - { - id = "dcpihecpambacapedldabdbpakmachpb"; - updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml"; - } - ]; - }; - }; - }; -} diff --git a/home-vinzenz.nix b/home-vinzenz.nix deleted file mode 100644 index 41640a1..0000000 --- a/home-vinzenz.nix +++ /dev/null @@ -1,233 +0,0 @@ -{ - config, - pkgs, - ... -}: { - # Define user account - users.users.vinzenz = { - isNormalUser = true; - description = "Vinzenz Schroeter"; - extraGroups = ["networkmanager" "wheel"]; - shell = pkgs.zsh; - }; - - # home manager - home-manager.useUserPackages = true; - home-manager.useGlobalPkgs = true; - home-manager.users.vinzenz = { - config, - pkgs, - ... - }: { - home = { - username = "vinzenz"; - homeDirectory = "/home/vinzenz"; - stateVersion = "22.11"; - - sessionVariables = { - EDITOR = "nano"; - }; - - packages = with pkgs; [ - keepassxc - steam - insync - telegram-desktop - simple-scan - wireguard-tools - element-desktop - etcher - iotop - radeontop - lsof - wirelesstools - powerline - powerline-fonts - thefuck - dotnet-sdk_7 - jetbrains.rider - alejandra - arduino - uucp - screen - jetbrains.pycharm-professional - kdiff3 - docker - wineWowPackages.stagingFull - wineWowPackages.fonts - winetricks - - (lutris.override { - extraPkgs = pkgs: [ - # List package dependencies here - ]; - extraLibraries = pkgs: [ - # List library dependencies here - ]; - }) - ]; - - file.".nanorc".text = '' - set linenumbers - set mouse - ''; - }; - - services = { - kdeconnect = { - enable = true; - indicator = true; - }; - }; - - programs = { - home-manager.enable = true; - - firefox.enable = true; - command-not-found.enable = true; - dircolors.enable = true; - fzf.enable = true; - htop.enable = true; - - zsh = { - enable = true; - - enableSyntaxHighlighting = true; - enableAutosuggestions = true; - enableVteIntegration = true; - - initExtra = '' - eval "$(direnv hook zsh)"; - eval $(thefuck --alias); - ''; - - shellAliases = { - my-apply = "sudo nixos-rebuild boot"; - my-switch = "sudo nixos-rebuild switch"; - my-update = "sudo nixos-rebuild boot --upgrade"; - my-fmt = "alejandra ."; - }; - - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - expireDuplicatesFirst = true; - }; - - oh-my-zsh = { - enable = true; - theme = "agnoster"; - plugins = ["git" "sudo" "docker" "systemadmin" "thefuck"]; - }; - }; - - git = { - enable = true; - userName = "Vinzenz Schroeter"; - userEmail = "vinzenz.f.s@gmail.com"; - - #package = pkgs.gitFull; - #config.credential.helper = "libsecret"; - - aliases = { - prettylog = "log --pretty=oneline --graph"; - }; - extraConfig = { - pull.ff = "only"; - init.defaultBranch = "main"; - merge.tool = "kdiff3"; - }; - }; - - gh = { - enable = true; - enableGitCredentialHelper = true; - }; - - vscode = { - enable = true; - package = pkgs.vscodium; - enableUpdateCheck = false; - extensions = with pkgs; [ - vscode-extensions.bbenoist.nix - vscode-extensions.ms-python.python - vscode-extensions.kamadorueda.alejandra - ]; - 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; - "workbench.startupEditor" = "readme"; - "markdown.extension.tableFormatter.normalizeIndentation" = true; - "markdown.extension.toc.orderedList" = false; - "telemetry.telemetryLevel" = "off"; - "redhat.telemetry.enabled" = false; - "workbench.enableExperiments" = 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"; - } - ]; - }; - - bottom = { - enable = true; - settings = { - # https://github.com/ClementTsang/bottom/blob/master/sample_configs/default_config.toml - }; - }; - - exa = { - enable = true; - git = true; - icons = true; - enableAliases = true; - extraOptions = [ - "--group-directories-first" - "--header" - ]; - }; - - # checked https://rycee.gitlab.io/home-manager/options.html until "programs.jq" - }; - - 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; - }; - }; - }; - }; -} diff --git a/kde.nix b/kde.nix deleted file mode 100644 index bebf59e..0000000 --- a/kde.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - config, - pkgs, - ... -}: { - services = { - # Enable the KDE Plasma Desktop Environment. - xserver = { - desktopManager.plasma5.enable = true; - - displayManager = { - sddm.enable = true; - defaultSession = "plasmawayland"; - }; - }; - }; - - environment.systemPackages = with pkgs; [ - libsForQt5.kate - libsForQt5.kalk - ]; - - environment.plasma5.excludePackages = with pkgs.libsForQt5; [ - elisa - gwenview - okular - khelpcenter - ]; - - programs = { - dconf.enable = true; - partition-manager.enable = true; - }; - - home-manager.users.vinzenz = { - config, - pkgs, - ... - }: { - home = { - packages = with pkgs; [ - ]; - }; - - services.kdeconnect = { - enable = true; - indicator = true; - }; - }; -} diff --git a/common.nix b/my/default.nix similarity index 95% rename from common.nix rename to my/default.nix index f954f14..444be5a 100644 --- a/common.nix +++ b/my/default.nix @@ -2,9 +2,18 @@ config, pkgs, modulesPath, + lib, ... -}: { +}: +with lib; let + cfg = config.my; +in { imports = [ + ./gnome.nix + ./home-vinzenz.nix + ./home-ronja.nix + ./kde.nix + # enable home manager (modulesPath + "/installer/scan/not-detected.nix") diff --git a/my/gnome.nix b/my/gnome.nix new file mode 100644 index 0000000..5acffeb --- /dev/null +++ b/my/gnome.nix @@ -0,0 +1,59 @@ +{ + config, + pkgs, + lib, + ... +}: +let + cfg = config.my.gnome; +in { + options.my.gnome = { + enable = lib.mkEnableOption "gnome desktop"; + }; + + config = lib.mkIf cfg.enable { + services = { + xserver = { + # Enable the GNOME Desktop Environment. + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + }; + + gnome = { + tracker-miners.enable = false; + tracker.enable = false; + }; + }; + + environment.systemPackages = [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 + seahorse # password manager + gnome-clocks + gnome-maps + gnome-weather + gnome-music + pkgs.gnome-connections + ]; + + home-manager.users = { + vinzenz = {pkgs, ...}: { + home.packages = with pkgs; [ + gnome.gpaste + amberol + ]; + + dconf.settings = { + "org/gnome/desktop/peripherals/keyboard" = { + numlock-state = true; + }; + }; + }; + }; + }; +} diff --git a/my/home-ronja.nix b/my/home-ronja.nix new file mode 100644 index 0000000..c8cf4a2 --- /dev/null +++ b/my/home-ronja.nix @@ -0,0 +1,129 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.my.users.ronja; +in { + options.my.users.ronja = { + enable = lib.mkEnableOption "user ronja"; + }; + + config = lib.mkIf cfg.enable { + # Define user account + users.users.ronja = { + isNormalUser = true; + description = "Ronja Spiegelberg"; + extraGroups = ["networkmanager" "wheel"]; + shell = pkgs.zsh; + }; + + # home manager + home-manager.useUserPackages = true; + home-manager.useGlobalPkgs = true; + home-manager.users.ronja = { + config, + pkgs, + ... + }: { + home = { + username = "ronja"; + homeDirectory = "/home/ronja"; + stateVersion = "22.11"; + + sessionVariables = { + EDITOR = "nano"; + }; + + packages = with pkgs; [ + ## Apps + steam + telegram-desktop + powerline + powerline-fonts + lutris + kdiff3 + wineWowPackages.stagingFull + wineWowPackages.fonts + winetricks + + (lutris.override { + extraPkgs = pkgs: [ + # List package dependencies here + ]; + extraLibraries = pkgs: [ + # List library dependencies here + ]; + }) + ]; + + file.".nanorc".text = '' + set linenumbers + set mouse + ''; + }; + + programs = { + home-manager.enable = true; + + firefox.enable = true; + command-not-found.enable = true; + dircolors.enable = true; + htop.enable = true; + + zsh = { + enable = true; + + enableSyntaxHighlighting = true; + enableAutosuggestions = true; + enableVteIntegration = true; + + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + expireDuplicatesFirst = true; + }; + + oh-my-zsh = { + enable = true; + theme = "agnoster"; + plugins = ["git" "sudo" "systemadmin"]; + }; + }; + + git = { + enable = true; + userName = "Ronja Spiegelberg"; + userEmail = "ronja.spiegelberg@gmail.com"; + + extraConfig = { + pull.ff = "only"; + init.defaultBranch = "main"; + merge.tool = "kdiff3"; + }; + }; + + gh = { + enable = true; + enableGitCredentialHelper = true; + }; + + chromium = { + enable = true; + extensions = [ + { + # ublock origin + id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; + } + { + id = "dcpihecpambacapedldabdbpakmachpb"; + updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml"; + } + ]; + }; + }; + }; + }; +} diff --git a/my/home-vinzenz.nix b/my/home-vinzenz.nix new file mode 100644 index 0000000..ceed7ff --- /dev/null +++ b/my/home-vinzenz.nix @@ -0,0 +1,243 @@ +{ + config, + pkgs, + lib, + ... +}: +let + cfg = config.my.users.vinzenz; +in { + options.my.users.vinzenz = { + enable = lib.mkEnableOption "user vinzenz"; + }; + + config = lib.mkIf cfg.enable { + # Define user account + users.users.vinzenz = { + isNormalUser = true; + description = "Vinzenz Schroeter"; + extraGroups = ["networkmanager" "wheel"]; + shell = pkgs.zsh; + }; + + # home manager + home-manager.useUserPackages = true; + home-manager.useGlobalPkgs = true; + home-manager.users.vinzenz = { + config, + pkgs, + ... + }: { + home = { + username = "vinzenz"; + homeDirectory = "/home/vinzenz"; + stateVersion = "22.11"; + + sessionVariables = { + EDITOR = "nano"; + }; + + packages = with pkgs; [ + keepassxc + steam + insync + telegram-desktop + simple-scan + wireguard-tools + element-desktop + etcher + iotop + radeontop + lsof + wirelesstools + powerline + powerline-fonts + thefuck + dotnet-sdk_7 + jetbrains.rider + alejandra + arduino + uucp + screen + jetbrains.pycharm-professional + kdiff3 + docker + wineWowPackages.stagingFull + wineWowPackages.fonts + winetricks + + (lutris.override { + extraPkgs = pkgs: [ + # List package dependencies here + ]; + extraLibraries = pkgs: [ + # List library dependencies here + ]; + }) + ]; + + file.".nanorc".text = '' + set linenumbers + set mouse + ''; + }; + + services = { + kdeconnect = { + enable = true; + indicator = true; + }; + }; + + programs = { + home-manager.enable = true; + + firefox.enable = true; + command-not-found.enable = true; + dircolors.enable = true; + fzf.enable = true; + htop.enable = true; + + zsh = { + enable = true; + + enableSyntaxHighlighting = true; + enableAutosuggestions = true; + enableVteIntegration = true; + + initExtra = '' + eval "$(direnv hook zsh)"; + eval $(thefuck --alias); + ''; + + shellAliases = { + my-apply = "sudo nixos-rebuild boot"; + my-switch = "sudo nixos-rebuild switch"; + my-update = "sudo nixos-rebuild boot --upgrade"; + my-fmt = "alejandra ."; + }; + + history = { + size = 10000; + path = "${config.xdg.dataHome}/zsh/history"; + expireDuplicatesFirst = true; + }; + + oh-my-zsh = { + enable = true; + theme = "agnoster"; + plugins = ["git" "sudo" "docker" "systemadmin" "thefuck"]; + }; + }; + + git = { + enable = true; + userName = "Vinzenz Schroeter"; + userEmail = "vinzenz.f.s@gmail.com"; + + #package = pkgs.gitFull; + #config.credential.helper = "libsecret"; + + aliases = { + prettylog = "log --pretty=oneline --graph"; + }; + extraConfig = { + pull.ff = "only"; + init.defaultBranch = "main"; + merge.tool = "kdiff3"; + }; + }; + + gh = { + enable = true; + enableGitCredentialHelper = true; + }; + + vscode = { + enable = true; + package = pkgs.vscodium; + enableUpdateCheck = false; + extensions = with pkgs; [ + vscode-extensions.bbenoist.nix + vscode-extensions.ms-python.python + vscode-extensions.kamadorueda.alejandra + ]; + 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; + "workbench.startupEditor" = "readme"; + "markdown.extension.tableFormatter.normalizeIndentation" = true; + "markdown.extension.toc.orderedList" = false; + "telemetry.telemetryLevel" = "off"; + "redhat.telemetry.enabled" = false; + "workbench.enableExperiments" = 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"; + } + ]; + }; + + bottom = { + enable = true; + settings = { + # https://github.com/ClementTsang/bottom/blob/master/sample_configs/default_config.toml + }; + }; + + exa = { + enable = true; + git = true; + icons = true; + enableAliases = true; + extraOptions = [ + "--group-directories-first" + "--header" + ]; + }; + + # checked https://rycee.gitlab.io/home-manager/options.html until "programs.jq" + }; + + 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; + }; + }; + }; + }; + }; +} diff --git a/my/kde.nix b/my/kde.nix new file mode 100644 index 0000000..26e65f8 --- /dev/null +++ b/my/kde.nix @@ -0,0 +1,60 @@ +{ + config, + pkgs, + lib, + ... +}: +let + cfg = config.my.kde; +in { + options.my.kde = { + enable = lib.mkEnableOption "KDE desktop"; + }; + + config = lib.mkIf cfg.enable { + services = { + # Enable the KDE Plasma Desktop Environment. + xserver = { + desktopManager.plasma5.enable = true; + + displayManager = { + sddm.enable = true; + defaultSession = "plasmawayland"; + }; + }; + }; + + environment.systemPackages = with pkgs; [ + libsForQt5.kate + libsForQt5.kalk + ]; + + environment.plasma5.excludePackages = with pkgs.libsForQt5; [ + elisa + gwenview + okular + khelpcenter + ]; + + programs = { + dconf.enable = true; + partition-manager.enable = true; + }; + + home-manager.users.vinzenz = { + config, + pkgs, + ... + }: { + home = { + packages = with pkgs; [ + ]; + }; + + services.kdeconnect = { + enable = true; + indicator = true; + }; + }; + }; +} diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index 7b07dab..ccc550e 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -6,11 +6,10 @@ }: { networking.hostName = "vinzenz-lpt"; - imports = [ - ./common.nix - ./gnome.nix - ./home-vinzenz.nix - ]; + my.gnome.enable = true; + my.users.vinzenz.enable = true; + + imports = [./my/default.nix]; services.flatpak.enable = true; diff --git a/vinzenz-pc3.nix b/vinzenz-pc3.nix index 3c32a63..ea23225 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc3.nix @@ -60,7 +60,7 @@ fsType = "btrfs"; options = ["subvolid=5"]; }; - + "/mnt/ssd2" = { device = "/dev/disk/by-uuid/6b2a647d-c68e-4c07-85bf-c9bfc5db7e8a"; fsType = "ext4"; From fae9e320454400ab31822c3806199b46b3e2a561 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 14:01:51 +0200 Subject: [PATCH 02/12] update pc3 for lib --- vinzenz-pc3.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vinzenz-pc3.nix b/vinzenz-pc3.nix index ea23225..afa0528 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc3.nix @@ -6,12 +6,13 @@ }: { networking.hostName = "vinzenz-pc3"; - imports = [ - ./common.nix - ./kde.nix - ./home-vinzenz.nix - ./home-ronja.nix - ]; + my.kde.enable = true; + my.users = { + vinzenz.enable = true; + ronja.enable = true; + }; + + imports = [./my/default.nix]; users.groups."games" = { members = ["vinzenz" "ronja"]; From a24b916572e56d1ddc2b9087dca47409c6355500 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 14:57:55 +0200 Subject: [PATCH 03/12] misc changes --- my/gnome.nix | 5 +- my/home-vinzenz.nix | 3 +- my/kde.nix | 3 +- vinzenz-lpt.nix | 76 ++++++++++++----------- vinzenz-pc3.nix | 148 ++++++++++++++++++++++---------------------- 5 files changed, 118 insertions(+), 117 deletions(-) diff --git a/my/gnome.nix b/my/gnome.nix index 5acffeb..07c8d1a 100644 --- a/my/gnome.nix +++ b/my/gnome.nix @@ -3,8 +3,7 @@ pkgs, lib, ... -}: -let +}: let cfg = config.my.gnome; in { options.my.gnome = { @@ -42,7 +41,7 @@ in { ]; home-manager.users = { - vinzenz = {pkgs, ...}: { + vinzenz = lib.mkIf config.my.users.vinzenz.enable { home.packages = with pkgs; [ gnome.gpaste amberol diff --git a/my/home-vinzenz.nix b/my/home-vinzenz.nix index ceed7ff..21a70b7 100644 --- a/my/home-vinzenz.nix +++ b/my/home-vinzenz.nix @@ -3,8 +3,7 @@ pkgs, lib, ... -}: -let +}: let cfg = config.my.users.vinzenz; in { options.my.users.vinzenz = { diff --git a/my/kde.nix b/my/kde.nix index 26e65f8..e874c50 100644 --- a/my/kde.nix +++ b/my/kde.nix @@ -3,8 +3,7 @@ pkgs, lib, ... -}: -let +}: let cfg = config.my.kde; in { options.my.kde = { diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index ccc550e..2b2da57 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -4,49 +4,51 @@ pkgs, ... }: { - networking.hostName = "vinzenz-lpt"; - - my.gnome.enable = true; - my.users.vinzenz.enable = true; - imports = [./my/default.nix]; - services.flatpak.enable = true; + config = { + networking.hostName = "vinzenz-lpt"; - boot = { - initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; - initrd.kernelModules = []; - kernelModules = ["kvm-intel"]; - extraModulePackages = []; - loader.efi.efiSysMountPoint = "/boot/efi"; - }; + my.gnome.enable = true; + my.users.vinzenz.enable = true; - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/34cb86c4-8823-4785-9672-92ef0bcd5eaf"; - fsType = "btrfs"; - options = ["subvol=@"]; + services.flatpak.enable = true; + + boot = { + initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; + initrd.kernelModules = []; + kernelModules = ["kvm-intel"]; + extraModulePackages = []; + loader.efi.efiSysMountPoint = "/boot/efi"; }; - "/boot/efi" = { - device = "/dev/disk/by-uuid/2381-1CD2"; - fsType = "vfat"; + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/34cb86c4-8823-4785-9672-92ef0bcd5eaf"; + fsType = "btrfs"; + options = ["subvol=@"]; + }; + + "/boot/efi" = { + device = "/dev/disk/by-uuid/2381-1CD2"; + fsType = "vfat"; + }; }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";} + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.enableRedistributableFirmware = true; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; - - swapDevices = [ - {device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";} - ]; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.enableRedistributableFirmware = true; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/vinzenz-pc3.nix b/vinzenz-pc3.nix index afa0528..2b961db 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc3.nix @@ -4,80 +4,82 @@ pkgs, ... }: { - networking.hostName = "vinzenz-pc3"; - - my.kde.enable = true; - my.users = { - vinzenz.enable = true; - ronja.enable = true; - }; - imports = [./my/default.nix]; - users.groups."games" = { - members = ["vinzenz" "ronja"]; + config = { + networking.hostName = "vinzenz-pc3"; + + my.kde.enable = true; + my.users = { + vinzenz.enable = true; + ronja.enable = true; + }; + + users.groups."games" = { + members = ["vinzenz" "ronja"]; + }; + + users.users.vinzenz.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming" + ]; + + boot = { + initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage" + initrd.kernelModules = []; + kernelModules = ["kvm-amd"]; + extraModulePackages = []; + loader.efi.efiSysMountPoint = "/boot"; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; + fsType = "btrfs"; + options = ["subvol=@"]; + }; + + "/home" = { + device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; + fsType = "btrfs"; + options = ["subvol=@home"]; + }; + + "/games" = { + device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; + fsType = "btrfs"; + options = ["subvol=@games"]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/AF67-8F16"; + fsType = "vfat"; + }; + + "/mnt/nixos_btrfs_root" = { + # subvolume with id 5 is always the root volume + # this is convenient for managing the flat subvolume hierarchy + device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; + fsType = "btrfs"; + options = ["subvolid=5"]; + }; + + "/mnt/ssd2" = { + device = "/dev/disk/by-uuid/6b2a647d-c68e-4c07-85bf-c9bfc5db7e8a"; + fsType = "ext4"; + }; + }; + + swapDevices = []; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; - - users.users.vinzenz.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming" - ]; - - boot = { - initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage" - initrd.kernelModules = []; - kernelModules = ["kvm-amd"]; - extraModulePackages = []; - loader.efi.efiSysMountPoint = "/boot"; - }; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; - fsType = "btrfs"; - options = ["subvol=@"]; - }; - - "/home" = { - device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; - fsType = "btrfs"; - options = ["subvol=@home"]; - }; - - "/games" = { - device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; - fsType = "btrfs"; - options = ["subvol=@games"]; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/AF67-8F16"; - fsType = "vfat"; - }; - - "/mnt/nixos_btrfs_root" = { - # subvolume with id 5 is always the root volume - # this is convenient for managing the flat subvolume hierarchy - device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; - fsType = "btrfs"; - options = ["subvolid=5"]; - }; - - "/mnt/ssd2" = { - device = "/dev/disk/by-uuid/6b2a647d-c68e-4c07-85bf-c9bfc5db7e8a"; - fsType = "ext4"; - }; - }; - - swapDevices = []; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } From 068c4469b29e5361121c58d7e8dddd05666571aa Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 15:01:01 +0200 Subject: [PATCH 04/12] apply numlock to multiple users without copy paste --- my/gnome.nix | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/my/gnome.nix b/my/gnome.nix index 07c8d1a..2f505c6 100644 --- a/my/gnome.nix +++ b/my/gnome.nix @@ -5,6 +5,19 @@ ... }: let cfg = config.my.gnome; + + applyGnomeUserSettings = { + home.packages = with pkgs; [ + gnome.gpaste + amberol + ]; + + dconf.settings = { + "org/gnome/desktop/peripherals/keyboard" = { + numlock-state = true; + }; + }; + }; in { options.my.gnome = { enable = lib.mkEnableOption "gnome desktop"; @@ -41,18 +54,8 @@ in { ]; home-manager.users = { - vinzenz = lib.mkIf config.my.users.vinzenz.enable { - home.packages = with pkgs; [ - gnome.gpaste - amberol - ]; - - dconf.settings = { - "org/gnome/desktop/peripherals/keyboard" = { - numlock-state = true; - }; - }; - }; + vinzenz = lib.mkIf config.my.users.vinzenz.enable applyGnomeUserSettings; + ronja = lib.mkIf config.my.users.ronja.enable applyGnomeUserSettings; }; }; } From 48024a6bae76d399a93236911265363d23f01d73 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 15:11:49 +0200 Subject: [PATCH 05/12] home submodule --- my/default.nix | 6 +---- my/gnome.nix | 4 ++-- my/home/default.nix | 25 +++++++++++++++++++ my/{home-ronja.nix => home/ronja.nix} | 7 +++--- my/{home-vinzenz.nix => home/vinzenz.nix} | 7 +++--- my/kde.nix | 29 ++++++++++++----------- vinzenz-lpt.nix | 2 +- vinzenz-pc3.nix | 2 +- 8 files changed, 51 insertions(+), 31 deletions(-) create mode 100644 my/home/default.nix rename my/{home-ronja.nix => home/ronja.nix} (95%) rename my/{home-vinzenz.nix => home/vinzenz.nix} (97%) diff --git a/my/default.nix b/my/default.nix index 444be5a..952b919 100644 --- a/my/default.nix +++ b/my/default.nix @@ -9,13 +9,9 @@ with lib; let cfg = config.my; in { imports = [ + ./home/default.nix ./gnome.nix - ./home-vinzenz.nix - ./home-ronja.nix ./kde.nix - - # enable home manager - (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/my/gnome.nix b/my/gnome.nix index 2f505c6..3044b0d 100644 --- a/my/gnome.nix +++ b/my/gnome.nix @@ -54,8 +54,8 @@ in { ]; home-manager.users = { - vinzenz = lib.mkIf config.my.users.vinzenz.enable applyGnomeUserSettings; - ronja = lib.mkIf config.my.users.ronja.enable applyGnomeUserSettings; + vinzenz = lib.mkIf config.my.home.vinzenz.enable applyGnomeUserSettings; + ronja = lib.mkIf config.my.home.ronja.enable applyGnomeUserSettings; }; }; } diff --git a/my/home/default.nix b/my/home/default.nix new file mode 100644 index 0000000..d32d8a7 --- /dev/null +++ b/my/home/default.nix @@ -0,0 +1,25 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.my.home; +in { + imports = [ + ./vinzenz.nix + ./ronja.nix + # enable home manager + + ]; + + options.my.home = { + enable = lib.mkEnableOption "my home management"; + }; + + config = lib.mkIf cfg.enable { + home-manager.useUserPackages = true; + home-manager.useGlobalPkgs = true; + }; +} diff --git a/my/home-ronja.nix b/my/home/ronja.nix similarity index 95% rename from my/home-ronja.nix rename to my/home/ronja.nix index c8cf4a2..0b11bea 100644 --- a/my/home-ronja.nix +++ b/my/home/ronja.nix @@ -5,9 +5,9 @@ ... }: with lib; let - cfg = config.my.users.ronja; + cfg = config.my.home.ronja; in { - options.my.users.ronja = { + options.my.home.ronja = { enable = lib.mkEnableOption "user ronja"; }; @@ -21,8 +21,7 @@ in { }; # home manager - home-manager.useUserPackages = true; - home-manager.useGlobalPkgs = true; + my.home.enable = true; home-manager.users.ronja = { config, pkgs, diff --git a/my/home-vinzenz.nix b/my/home/vinzenz.nix similarity index 97% rename from my/home-vinzenz.nix rename to my/home/vinzenz.nix index 21a70b7..7846eee 100644 --- a/my/home-vinzenz.nix +++ b/my/home/vinzenz.nix @@ -4,9 +4,9 @@ lib, ... }: let - cfg = config.my.users.vinzenz; + cfg = config.my.home.vinzenz; in { - options.my.users.vinzenz = { + options.my.home.vinzenz = { enable = lib.mkEnableOption "user vinzenz"; }; @@ -20,8 +20,7 @@ in { }; # home manager - home-manager.useUserPackages = true; - home-manager.useGlobalPkgs = true; + my.home.enable = true; home-manager.users.vinzenz = { config, pkgs, diff --git a/my/kde.nix b/my/kde.nix index e874c50..87b0835 100644 --- a/my/kde.nix +++ b/my/kde.nix @@ -5,6 +5,18 @@ ... }: let cfg = config.my.kde; + + applyKdeUserSettings = { + home = { + packages = with pkgs; [ + ]; + }; + + services.kdeconnect = { + enable = true; + indicator = true; + }; + }; in { options.my.kde = { enable = lib.mkEnableOption "KDE desktop"; @@ -40,20 +52,9 @@ in { partition-manager.enable = true; }; - home-manager.users.vinzenz = { - config, - pkgs, - ... - }: { - home = { - packages = with pkgs; [ - ]; - }; - - services.kdeconnect = { - enable = true; - indicator = true; - }; + home-manager.users = { + vinzenz = lib.mkIf config.my.home.vinzenz.enable applyKdeUserSettings; + ronja = lib.mkIf config.my.home.ronja.enable applyKdeUserSettings; }; }; } diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index 2b2da57..39c3068 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -10,7 +10,7 @@ networking.hostName = "vinzenz-lpt"; my.gnome.enable = true; - my.users.vinzenz.enable = true; + my.home.vinzenz.enable = true; services.flatpak.enable = true; diff --git a/vinzenz-pc3.nix b/vinzenz-pc3.nix index 2b961db..d2a35d2 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc3.nix @@ -10,7 +10,7 @@ networking.hostName = "vinzenz-pc3"; my.kde.enable = true; - my.users = { + my.home = { vinzenz.enable = true; ronja.enable = true; }; From 8df61f216eae02b4b3e26838b543b1ac9840195b Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 15:21:27 +0200 Subject: [PATCH 06/12] split hardware back out again, dir rename --- hardware/vinzenz-lpt.nix | 44 +++++++++++++++++++++ hardware/vinzenz-pc3.nix | 67 ++++++++++++++++++++++++++++++++ {my => modules}/default.nix | 2 +- {my => modules}/gnome.nix | 0 {my => modules}/home/default.nix | 0 {my => modules}/home/ronja.nix | 0 {my => modules}/home/vinzenz.nix | 0 {my => modules}/kde.nix | 8 ++-- vinzenz-lpt.nix | 42 ++------------------ vinzenz-pc3.nix | 64 ++---------------------------- 10 files changed, 124 insertions(+), 103 deletions(-) create mode 100644 hardware/vinzenz-lpt.nix create mode 100644 hardware/vinzenz-pc3.nix rename {my => modules}/default.nix (99%) rename {my => modules}/gnome.nix (100%) rename {my => modules}/home/default.nix (100%) rename {my => modules}/home/ronja.nix (100%) rename {my => modules}/home/vinzenz.nix (100%) rename {my => modules}/kde.nix (94%) diff --git a/hardware/vinzenz-lpt.nix b/hardware/vinzenz-lpt.nix new file mode 100644 index 0000000..bcb7160 --- /dev/null +++ b/hardware/vinzenz-lpt.nix @@ -0,0 +1,44 @@ +{ + config, + lib, + ... +}: { + config = { + boot = { + initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; + initrd.kernelModules = []; + kernelModules = ["kvm-intel"]; + extraModulePackages = []; + loader.efi.efiSysMountPoint = "/boot/efi"; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/34cb86c4-8823-4785-9672-92ef0bcd5eaf"; + fsType = "btrfs"; + options = ["subvol=@"]; + }; + + "/boot/efi" = { + device = "/dev/disk/by-uuid/2381-1CD2"; + fsType = "vfat"; + }; + }; + + swapDevices = [ + {device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";} + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.enableRedistributableFirmware = true; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/hardware/vinzenz-pc3.nix b/hardware/vinzenz-pc3.nix new file mode 100644 index 0000000..6c25f47 --- /dev/null +++ b/hardware/vinzenz-pc3.nix @@ -0,0 +1,67 @@ +{ + config, + lib, + pkgs, + ... +}: { + config = { + boot = { + initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage" + initrd.kernelModules = []; + kernelModules = ["kvm-amd"]; + extraModulePackages = []; + loader.efi.efiSysMountPoint = "/boot"; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; + fsType = "btrfs"; + options = ["subvol=@"]; + }; + + "/home" = { + device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; + fsType = "btrfs"; + options = ["subvol=@home"]; + }; + + "/games" = { + device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; + fsType = "btrfs"; + options = ["subvol=@games"]; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/AF67-8F16"; + fsType = "vfat"; + }; + + "/mnt/nixos_btrfs_root" = { + # subvolume with id 5 is always the root volume + # this is convenient for managing the flat subvolume hierarchy + device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; + fsType = "btrfs"; + options = ["subvolid=5"]; + }; + + "/mnt/ssd2" = { + device = "/dev/disk/by-uuid/6b2a647d-c68e-4c07-85bf-c9bfc5db7e8a"; + fsType = "ext4"; + }; + }; + + swapDevices = []; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/my/default.nix b/modules/default.nix similarity index 99% rename from my/default.nix rename to modules/default.nix index 952b919..16df219 100644 --- a/my/default.nix +++ b/modules/default.nix @@ -9,7 +9,7 @@ with lib; let cfg = config.my; in { imports = [ - ./home/default.nix + ./home ./gnome.nix ./kde.nix (modulesPath + "/installer/scan/not-detected.nix") diff --git a/my/gnome.nix b/modules/gnome.nix similarity index 100% rename from my/gnome.nix rename to modules/gnome.nix diff --git a/my/home/default.nix b/modules/home/default.nix similarity index 100% rename from my/home/default.nix rename to modules/home/default.nix diff --git a/my/home/ronja.nix b/modules/home/ronja.nix similarity index 100% rename from my/home/ronja.nix rename to modules/home/ronja.nix diff --git a/my/home/vinzenz.nix b/modules/home/vinzenz.nix similarity index 100% rename from my/home/vinzenz.nix rename to modules/home/vinzenz.nix diff --git a/my/kde.nix b/modules/kde.nix similarity index 94% rename from my/kde.nix rename to modules/kde.nix index 87b0835..0faecec 100644 --- a/my/kde.nix +++ b/modules/kde.nix @@ -7,10 +7,10 @@ cfg = config.my.kde; applyKdeUserSettings = { - home = { - packages = with pkgs; [ - ]; - }; + #home = { + # packages = with pkgs; [ + # ]; + #}; services.kdeconnect = { enable = true; diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index 39c3068..edb2e14 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -4,7 +4,10 @@ pkgs, ... }: { - imports = [./my/default.nix]; + imports = [ + ./modules + ./hardware/vinzenz-lpt.nix + ]; config = { networking.hostName = "vinzenz-lpt"; @@ -13,42 +16,5 @@ my.home.vinzenz.enable = true; services.flatpak.enable = true; - - boot = { - initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; - initrd.kernelModules = []; - kernelModules = ["kvm-intel"]; - extraModulePackages = []; - loader.efi.efiSysMountPoint = "/boot/efi"; - }; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/34cb86c4-8823-4785-9672-92ef0bcd5eaf"; - fsType = "btrfs"; - options = ["subvol=@"]; - }; - - "/boot/efi" = { - device = "/dev/disk/by-uuid/2381-1CD2"; - fsType = "vfat"; - }; - }; - - swapDevices = [ - {device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";} - ]; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.enableRedistributableFirmware = true; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; } diff --git a/vinzenz-pc3.nix b/vinzenz-pc3.nix index d2a35d2..817a647 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc3.nix @@ -4,7 +4,10 @@ pkgs, ... }: { - imports = [./my/default.nix]; + imports = [ + ./modules + ./hardware/vinzenz-pc3.nix + ]; config = { networking.hostName = "vinzenz-pc3"; @@ -22,64 +25,5 @@ users.users.vinzenz.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINrY6tcgnoC/xbgL7vxSjddEY9MBxRXe9n2cAHt88/TT home roaming" ]; - - boot = { - initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage" - initrd.kernelModules = []; - kernelModules = ["kvm-amd"]; - extraModulePackages = []; - loader.efi.efiSysMountPoint = "/boot"; - }; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; - fsType = "btrfs"; - options = ["subvol=@"]; - }; - - "/home" = { - device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; - fsType = "btrfs"; - options = ["subvol=@home"]; - }; - - "/games" = { - device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; - fsType = "btrfs"; - options = ["subvol=@games"]; - }; - - "/boot" = { - device = "/dev/disk/by-uuid/AF67-8F16"; - fsType = "vfat"; - }; - - "/mnt/nixos_btrfs_root" = { - # subvolume with id 5 is always the root volume - # this is convenient for managing the flat subvolume hierarchy - device = "/dev/disk/by-uuid/0e9c983a-e733-447e-8181-f41d6670c4b8"; - fsType = "btrfs"; - options = ["subvolid=5"]; - }; - - "/mnt/ssd2" = { - device = "/dev/disk/by-uuid/6b2a647d-c68e-4c07-85bf-c9bfc5db7e8a"; - fsType = "ext4"; - }; - }; - - swapDevices = []; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; } From 00fbfd0fefe985786f4d19a75adc4a4795499f89 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 15:44:15 +0200 Subject: [PATCH 07/12] split configs --- modules/default.nix | 148 ++++++++------------------------ modules/desktop/default.nix | 64 ++++++++++++++ modules/{ => desktop}/gnome.nix | 2 + modules/{ => desktop}/kde.nix | 2 + modules/home/vinzenz.nix | 5 +- modules/i18n.nix | 28 ++++++ modules/nixpkgs.nix | 21 +++++ 7 files changed, 153 insertions(+), 117 deletions(-) create mode 100644 modules/desktop/default.nix rename modules/{ => desktop}/gnome.nix (97%) rename modules/{ => desktop}/kde.nix (97%) create mode 100644 modules/i18n.nix create mode 100644 modules/nixpkgs.nix diff --git a/modules/default.nix b/modules/default.nix index 16df219..759034d 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -10,80 +10,30 @@ with lib; let in { imports = [ ./home - ./gnome.nix - ./kde.nix + ./desktop + ./i18n.nix + ./nixpkgs.nix (modulesPath + "/installer/scan/not-detected.nix") ]; - nixpkgs.config = { - allowUnfree = true; - permittedInsecurePackages = [ - "electron-12.2.3" - ]; - }; - - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - - networking = { - # wireless.enable = true; # Enables wireless support via wpa_supplicant. - # wireless.userControlled.enable = true; - - # Enable networking - networkmanager.enable = true; - - firewall = { - enable = true; - allowedTCPPortRanges = [ - { - # KDE Connect - from = 1714; - to = 1764; - } - ]; - allowedUDPPortRanges = [ - { - # KDE Connect - from = 1714; - to = 1764; - } - ]; - }; - }; - - time.timeZone = "Europe/Berlin"; - i18n = { - defaultLocale = "en_US.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - }; - }; - - services = { - xserver = { - # Enable the X11 windowing system / wayland depending on DE - enable = true; - - # Configure keymap in X11 - layout = "de"; - xkbVariant = ""; + config = { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; }; - # Enable CUPS to print documents. - printing.enable = true; + networking = { + # wireless.enable = true; # Enables wireless support via wpa_supplicant. + # wireless.userControlled.enable = true; + + # Enable networking + networkmanager.enable = true; + + firewall.enable = true; + }; # Enable the OpenSSH daemon. - openssh = { + services.openssh = { enable = true; settings = { PermitRootLogin = "no"; @@ -91,58 +41,28 @@ in { KbdInteractiveAuthentication = false; }; }; - }; - systemd.extraConfig = '' - DefaultTimeoutStopSec=7s - ''; + systemd.extraConfig = '' + DefaultTimeoutStopSec=12s + ''; - # Configure console keymap - console.keyMap = "de"; + programs = { + zsh.enable = true; - # 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; - }; - - system = { - stateVersion = "22.11"; - autoUpgrade.enable = true; # enable auto updates - }; - - nix.gc = { - automatic = true; - dates = "00:30"; - }; - - programs = { - git = { - enable = true; - package = pkgs.gitFull; + git = { + enable = true; + package = pkgs.gitFull; + }; }; - steam = { - enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + environment = { + pathsToLink = ["/share/zsh"]; + + systemPackages = with pkgs; [ + lm_sensors + tldr + ncdu + ]; }; - - zsh.enable = true; - }; - - environment = { - pathsToLink = ["/share/zsh"]; - - systemPackages = with pkgs; [ - lm_sensors - tldr - ncdu - ]; }; } diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix new file mode 100644 index 0000000..771dff8 --- /dev/null +++ b/modules/desktop/default.nix @@ -0,0 +1,64 @@ +{ + config, + pkgs, + lib, + ... +}: let + cfg = config.my.desktop; +in { + imports = [ + ./gnome.nix + ./kde.nix + ]; + + options.my.desktop = { + enable = lib.mkEnableOption "desktop"; + }; + + config = lib.mkIf cfg.enable { + services = { + # Enable the X11 windowing system / wayland depending on DE + xserver.enable = true; + + # Enable CUPS to print documents. + printing.enable = true; + }; + + # 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; + }; + + programs = { + steam = { + enable = true; + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server + }; + }; + + # unblock kde connect / gsconnect + networking.firewall = { + allowedTCPPortRanges = [ + { + # KDE Connect + from = 1714; + to = 1764; + } + ]; + allowedUDPPortRanges = [ + { + # KDE Connect + from = 1714; + to = 1764; + } + ]; + }; + }; +} diff --git a/modules/gnome.nix b/modules/desktop/gnome.nix similarity index 97% rename from modules/gnome.nix rename to modules/desktop/gnome.nix index 3044b0d..8b3c5c0 100644 --- a/modules/gnome.nix +++ b/modules/desktop/gnome.nix @@ -24,6 +24,8 @@ in { }; config = lib.mkIf cfg.enable { + my.desktop.enable = true; + services = { xserver = { # Enable the GNOME Desktop Environment. diff --git a/modules/kde.nix b/modules/desktop/kde.nix similarity index 97% rename from modules/kde.nix rename to modules/desktop/kde.nix index 0faecec..d56f322 100644 --- a/modules/kde.nix +++ b/modules/desktop/kde.nix @@ -23,6 +23,8 @@ in { }; config = lib.mkIf cfg.enable { + my.desktop.enable = true; + services = { # Enable the KDE Plasma Desktop Environment. xserver = { diff --git a/modules/home/vinzenz.nix b/modules/home/vinzenz.nix index 7846eee..2538077 100644 --- a/modules/home/vinzenz.nix +++ b/modules/home/vinzenz.nix @@ -133,16 +133,15 @@ in { userName = "Vinzenz Schroeter"; userEmail = "vinzenz.f.s@gmail.com"; - #package = pkgs.gitFull; - #config.credential.helper = "libsecret"; - aliases = { prettylog = "log --pretty=oneline --graph"; }; + extraConfig = { pull.ff = "only"; init.defaultBranch = "main"; merge.tool = "kdiff3"; + push.autoSetupRemote = "true"; }; }; diff --git a/modules/i18n.nix b/modules/i18n.nix new file mode 100644 index 0000000..3d38ec1 --- /dev/null +++ b/modules/i18n.nix @@ -0,0 +1,28 @@ +{...}: { + config = { + time.timeZone = "Europe/Berlin"; + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + }; + + services.xserver = { + # Configure keymap in X11 + layout = "de"; + xkbVariant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; + }; +} diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix new file mode 100644 index 0000000..dc7c9e9 --- /dev/null +++ b/modules/nixpkgs.nix @@ -0,0 +1,21 @@ +{...}: { + config = { + nixpkgs.config = { + allowUnfree = true; + permittedInsecurePackages = [ + "electron-12.2.3" + ]; + }; + + system = { + stateVersion = "22.11"; + # enable auto updates + autoUpgrade.enable = true; + }; + + nix.gc = { + automatic = true; + dates = "00:30"; + }; + }; +} From d2f8f28143ac0b4e28cbdceab7fef4db8ec12109 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 15:54:03 +0200 Subject: [PATCH 08/12] common hardware config --- hardware/common.nix | 28 ++++++++++++++++++++++++++++ hardware/vinzenz-lpt.nix | 16 +++++----------- hardware/vinzenz-pc3.nix | 20 +++++++------------- modules/default.nix | 11 ----------- 4 files changed, 40 insertions(+), 35 deletions(-) create mode 100644 hardware/common.nix diff --git a/hardware/common.nix b/hardware/common.nix new file mode 100644 index 0000000..c5b01d8 --- /dev/null +++ b/hardware/common.nix @@ -0,0 +1,28 @@ +{ + modulesPath, + lib, + ... +}: { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + config = { + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + hardware.enableRedistributableFirmware = true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + }; +} diff --git a/hardware/vinzenz-lpt.nix b/hardware/vinzenz-lpt.nix index bcb7160..a82ae33 100644 --- a/hardware/vinzenz-lpt.nix +++ b/hardware/vinzenz-lpt.nix @@ -1,8 +1,12 @@ { - config, lib, + config, ... }: { + imports = [ + ./common.nix + ]; + config = { boot = { initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; @@ -29,16 +33,6 @@ {device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";} ]; - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.enableRedistributableFirmware = true; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; } diff --git a/hardware/vinzenz-pc3.nix b/hardware/vinzenz-pc3.nix index 6c25f47..a15c1cb 100644 --- a/hardware/vinzenz-pc3.nix +++ b/hardware/vinzenz-pc3.nix @@ -1,9 +1,12 @@ { - config, lib, - pkgs, + config, ... }: { + imports = [ + ./common.nix + ]; + config = { boot = { initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage" @@ -52,16 +55,7 @@ }; swapDevices = []; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/modules/default.nix b/modules/default.nix index 759034d..d908e69 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -13,22 +13,11 @@ in { ./desktop ./i18n.nix ./nixpkgs.nix - (modulesPath + "/installer/scan/not-detected.nix") ]; config = { - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - networking = { - # wireless.enable = true; # Enables wireless support via wpa_supplicant. - # wireless.userControlled.enable = true; - - # Enable networking networkmanager.enable = true; - firewall.enable = true; }; From 00c2c2afefda2622ebe6b3e9169022fe5e1aad2f Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 19:22:11 +0200 Subject: [PATCH 09/12] temporary fix for recursion, remove duplicate hostname in main config --- hardware/{common.nix => default.nix} | 5 ++++- hardware/vinzenz-lpt.nix | 12 ++---------- hardware/vinzenz-pc3.nix | 12 ++---------- modules/default.nix | 5 +---- modules/desktop/gnome.nix | 26 +++++++++++++------------- modules/desktop/kde.nix | 24 ++++++++++++------------ modules/home/default.nix | 3 +-- vinzenz-lpt.nix | 4 +--- vinzenz-pc3.nix | 4 +--- 9 files changed, 37 insertions(+), 58 deletions(-) rename hardware/{common.nix => default.nix} (89%) diff --git a/hardware/common.nix b/hardware/default.nix similarity index 89% rename from hardware/common.nix rename to hardware/default.nix index c5b01d8..3a06ecb 100644 --- a/hardware/common.nix +++ b/hardware/default.nix @@ -1,13 +1,16 @@ -{ +hostName: { modulesPath, lib, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + (builtins.toString ./. + "/${hostName}.nix") ]; config = { + networking.hostName = hostName; + boot.loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; diff --git a/hardware/vinzenz-lpt.nix b/hardware/vinzenz-lpt.nix index a82ae33..cf01a43 100644 --- a/hardware/vinzenz-lpt.nix +++ b/hardware/vinzenz-lpt.nix @@ -1,12 +1,4 @@ -{ - lib, - config, - ... -}: { - imports = [ - ./common.nix - ]; - +{...}: { config = { boot = { initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; @@ -33,6 +25,6 @@ {device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";} ]; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = true; }; } diff --git a/hardware/vinzenz-pc3.nix b/hardware/vinzenz-pc3.nix index a15c1cb..c09eca7 100644 --- a/hardware/vinzenz-pc3.nix +++ b/hardware/vinzenz-pc3.nix @@ -1,12 +1,4 @@ -{ - lib, - config, - ... -}: { - imports = [ - ./common.nix - ]; - +{...}: { config = { boot = { initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage" @@ -57,5 +49,5 @@ swapDevices = []; }; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = true; } diff --git a/modules/default.nix b/modules/default.nix index d908e69..71d87d1 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,11 +1,8 @@ { config, pkgs, - modulesPath, - lib, ... -}: -with lib; let +}: let cfg = config.my; in { imports = [ diff --git a/modules/desktop/gnome.nix b/modules/desktop/gnome.nix index 8b3c5c0..f440fa2 100644 --- a/modules/desktop/gnome.nix +++ b/modules/desktop/gnome.nix @@ -6,18 +6,18 @@ }: let cfg = config.my.gnome; - applyGnomeUserSettings = { - home.packages = with pkgs; [ - gnome.gpaste - amberol - ]; + #applyGnomeUserSettings = { + # home.packages = with pkgs; [ + # gnome.gpaste + # amberol + # ]; - dconf.settings = { - "org/gnome/desktop/peripherals/keyboard" = { - numlock-state = true; - }; - }; - }; +# dconf.settings = { + # "org/gnome/desktop/peripherals/keyboard" = { + # numlock-state = true; + # }; + # }; + #}; in { options.my.gnome = { enable = lib.mkEnableOption "gnome desktop"; @@ -56,8 +56,8 @@ in { ]; home-manager.users = { - vinzenz = lib.mkIf config.my.home.vinzenz.enable applyGnomeUserSettings; - ronja = lib.mkIf config.my.home.ronja.enable applyGnomeUserSettings; + # vinzenz = lib.mkIf config.my.home.vinzenz.enable applyGnomeUserSettings; + # ronja = lib.mkIf config.my.home.ronja.enable applyGnomeUserSettings; }; }; } diff --git a/modules/desktop/kde.nix b/modules/desktop/kde.nix index d56f322..24af742 100644 --- a/modules/desktop/kde.nix +++ b/modules/desktop/kde.nix @@ -6,17 +6,17 @@ }: let cfg = config.my.kde; - applyKdeUserSettings = { - #home = { - # packages = with pkgs; [ - # ]; - #}; + # applyKdeUserSettings = { + # #home = { + # # packages = with pkgs; [ + # # ]; + # #}; - services.kdeconnect = { - enable = true; - indicator = true; - }; - }; + # services.kdeconnect = { + # enable = true; + # indicator = true; + # }; + # }; in { options.my.kde = { enable = lib.mkEnableOption "KDE desktop"; @@ -55,8 +55,8 @@ in { }; home-manager.users = { - vinzenz = lib.mkIf config.my.home.vinzenz.enable applyKdeUserSettings; - ronja = lib.mkIf config.my.home.ronja.enable applyKdeUserSettings; + #vinzenz = lib.mkIf config.my.home.vinzenz.enable applyKdeUserSettings; + #ronja = lib.mkIf config.my.home.ronja.enable applyKdeUserSettings; }; }; } diff --git a/modules/home/default.nix b/modules/home/default.nix index d32d8a7..6d85a0d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -3,8 +3,7 @@ pkgs, lib, ... -}: -with lib; let +}: let cfg = config.my.home; in { imports = [ diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index edb2e14..db74c7f 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -6,12 +6,10 @@ }: { imports = [ ./modules - ./hardware/vinzenz-lpt.nix + (import ./hardware "vinzenz-lpt") ]; config = { - networking.hostName = "vinzenz-lpt"; - my.gnome.enable = true; my.home.vinzenz.enable = true; diff --git a/vinzenz-pc3.nix b/vinzenz-pc3.nix index 817a647..cbbbf61 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc3.nix @@ -6,12 +6,10 @@ }: { imports = [ ./modules - ./hardware/vinzenz-pc3.nix + (import ./hardware "vinzenz-pc3") ]; config = { - networking.hostName = "vinzenz-pc3"; - my.kde.enable = true; my.home = { vinzenz.enable = true; From 0423ab72dc0a8416adf90070261821a791d34fe7 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 19:34:23 +0200 Subject: [PATCH 10/12] remove imports --- vinzenz-lpt.nix | 7 +------ vinzenz-pc3.nix | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index db74c7f..5474c3d 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: { +{...}: { imports = [ ./modules (import ./hardware "vinzenz-lpt") diff --git a/vinzenz-pc3.nix b/vinzenz-pc3.nix index cbbbf61..5e0f097 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc3.nix @@ -1,9 +1,4 @@ -{ - config, - lib, - pkgs, - ... -}: { +{...}: { imports = [ ./modules (import ./hardware "vinzenz-pc3") From e085501d0007006e610d8362f03454943bcacdac Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 19:37:08 +0200 Subject: [PATCH 11/12] fix braces --- hardware/vinzenz-pc3.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hardware/vinzenz-pc3.nix b/hardware/vinzenz-pc3.nix index c09eca7..8e27145 100644 --- a/hardware/vinzenz-pc3.nix +++ b/hardware/vinzenz-pc3.nix @@ -47,7 +47,7 @@ }; swapDevices = []; - }; - hardware.cpu.amd.updateMicrocode = true; + hardware.cpu.amd.updateMicrocode = true; + }; } From dbe364c39cea31ebafe2be5c21bd304c79203c12 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Sat, 9 Sep 2023 19:38:21 +0200 Subject: [PATCH 12/12] pc3 is pc2 --- hardware/{vinzenz-pc3.nix => vinzenz-pc2.nix} | 0 vinzenz-pc3.nix => vinzenz-pc2.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename hardware/{vinzenz-pc3.nix => vinzenz-pc2.nix} (100%) rename vinzenz-pc3.nix => vinzenz-pc2.nix (91%) diff --git a/hardware/vinzenz-pc3.nix b/hardware/vinzenz-pc2.nix similarity index 100% rename from hardware/vinzenz-pc3.nix rename to hardware/vinzenz-pc2.nix diff --git a/vinzenz-pc3.nix b/vinzenz-pc2.nix similarity index 91% rename from vinzenz-pc3.nix rename to vinzenz-pc2.nix index 5e0f097..83ea523 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc2.nix @@ -1,7 +1,7 @@ {...}: { imports = [ ./modules - (import ./hardware "vinzenz-pc3") + (import ./hardware "vinzenz-pc2") ]; config = {