From 39fb8c64dc6c6d26a895eceb0bb73508add1779e Mon Sep 17 00:00:00 2001 From: Philipp Date: Sat, 8 Feb 2025 23:19:59 +0100 Subject: [PATCH] add chatterino, plasma-config, kitty, runelite, eza fix formatting, fix btrfs being enabled by default update flake --- flake.lock | 30 +++++----- flake.nix | 5 +- homes/x86_64-linux/philipp/default.nix | 7 +++ modules/home/apps/chatterino/default.nix | 22 +++++++ modules/home/desktop/panel/default.nix | 60 +++++++++++++++++++ modules/home/desktop/shortcuts/default.nix | 7 ++- modules/home/games/runelite/default.nix | 21 +++++++ modules/nixos/cli/eza/default.nix | 22 +++++++ modules/nixos/desktop/plasma/default.nix | 4 +- modules/nixos/services/btrfs/default.nix | 2 +- modules/nixos/services/caddy/default.nix | 1 + modules/nixos/system/gnupg/default.nix | 26 ++++++++ modules/nixos/user/default.nix | 9 --- systems/aarch64-linux/blarm/default.nix | 15 +---- systems/x86_64-linux/bodenheizung/default.nix | 12 ++-- 15 files changed, 195 insertions(+), 48 deletions(-) create mode 100644 modules/home/apps/chatterino/default.nix create mode 100644 modules/home/desktop/panel/default.nix create mode 100644 modules/home/games/runelite/default.nix create mode 100644 modules/nixos/cli/eza/default.nix create mode 100644 modules/nixos/system/gnupg/default.nix diff --git a/flake.lock b/flake.lock index f631926..9d1fea2 100644 --- a/flake.lock +++ b/flake.lock @@ -9,11 +9,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1738555412, - "narHash": "sha256-G5oWvS5yBdZTvl7xmVGXud8l3FLLfst1RZE/a0fdgDo=", + "lastModified": 1739003331, + "narHash": "sha256-GVcw+qO4cNHG1kjvw2Jy3341Xe4w0jRzjQ2awyhOgEI=", "owner": "rycee", "repo": "nur-expressions", - "rev": "ec9525db7b22db431208013dcc9a1d510fc387cf", + "rev": "8f2693e1459d1a7a13aaa9fa702c210e9462b65b", "type": "gitlab" }, "original": { @@ -191,11 +191,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1738471961, - "narHash": "sha256-cgXDFrplNGs7bCVzXhRofjD8oJYqqXGcmUzXjHmip6Y=", + "lastModified": 1738816619, + "narHash": "sha256-5yRlg48XmpcX5b5HesdGMOte+YuCy9rzQkJz+imcu6I=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "537286c3c59b40311e5418a180b38034661d2536", + "rev": "2eccff41bab80839b1d25b303b53d339fbb07087", "type": "github" }, "original": { @@ -206,11 +206,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1738435198, - "narHash": "sha256-5+Hmo4nbqw8FrW85FlNm4IIrRnZ7bn0cmXlScNsNRLo=", + "lastModified": 1738843498, + "narHash": "sha256-7x+Q4xgFj9UxZZO9aUDCR8h4vyYut4zPUvfj3i+jBHE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f6687779bf4c396250831aa5a32cbfeb85bb07a3", + "rev": "f5a32fa27df91dfc4b762671a0e0a859a8a0058f", "type": "github" }, "original": { @@ -441,11 +441,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1738504946, - "narHash": "sha256-/btrLwD7UFgNWPxdewMdYYiI2GJxYipGnLuX7pRVAjc=", + "lastModified": 1739000762, + "narHash": "sha256-DBhyyeHw/EJEoc9fRBt+9FEckv5XlnFDBDmxi4Owru4=", "owner": "notashelf", "repo": "nvf", - "rev": "944327329712eda9eec8a86a972e0abd7ea368e6", + "rev": "316d4a0825edde5fa84c0cbd32413f4096aee254", "type": "github" }, "original": { @@ -3238,11 +3238,11 @@ }, "unstable": { "locked": { - "lastModified": 1738410390, - "narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=", + "lastModified": 1738961098, + "narHash": "sha256-yWNBf6VDW38tl179FEuJ0qukthVfB02kv+mRsfUsWC0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3a228057f5b619feb3186e986dbe76278d707b6e", + "rev": "a3eaf5e8eca7cab680b964138fb79073704aca75", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ebb010a..bdfbbe8 100644 --- a/flake.nix +++ b/flake.nix @@ -50,8 +50,9 @@ channels-config.allowUnfree = true; systems.modules.nixos = with inputs; [ - home-manager.nixosModules.home-manager { - home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; + home-manager.nixosModules.home-manager + { + home-manager.sharedModules = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; home-manager.backupFileExtension = "bk-hm"; } nvf.nixosModules.default diff --git a/homes/x86_64-linux/philipp/default.nix b/homes/x86_64-linux/philipp/default.nix index 29fa9b0..64195a2 100644 --- a/homes/x86_64-linux/philipp/default.nix +++ b/homes/x86_64-linux/philipp/default.nix @@ -15,13 +15,20 @@ apps = { librewolf.enable = true; + chatterino.enable = true; kitty = { enable = true; plasma.enable = true; }; }; + + games = { + runelite.enable = true; + }; + desktop = { hotkeys.enable = true; + panel.enable = true; }; }; } diff --git a/modules/home/apps/chatterino/default.nix b/modules/home/apps/chatterino/default.nix new file mode 100644 index 0000000..5b6f8e6 --- /dev/null +++ b/modules/home/apps/chatterino/default.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + pkgs, + namespace, + ... +}: +with lib; +with lib.${namespace}; +let + cfg = config.${namespace}.apps.chatterino; +in +{ + options.${namespace}.apps.chatterino = with types; { + enable = mkBoolOpt false "Whether or not to enable kitty."; + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.chatterino2 ]; + }; + +} diff --git a/modules/home/desktop/panel/default.nix b/modules/home/desktop/panel/default.nix new file mode 100644 index 0000000..ff73efe --- /dev/null +++ b/modules/home/desktop/panel/default.nix @@ -0,0 +1,60 @@ +{ + config, + lib, + namespace, + ... +}: +with lib; +with lib.${namespace}; +let + cfg = config.${namespace}.desktop.panel; +in +{ + options.${namespace}.desktop.panel = with types; { + enable = mkBoolOpt false "Whether or not to enable custom panel settings."; + }; + + config = mkIf cfg.enable { + programs.plasma = { + enable = true; + panels = [ + { + location = "top"; + floating = true; + screen = [ + 1 + 3 + ]; + widgets = [ + { + kickoff = { + sortAlphabetically = true; + icon = "nix-snowflake-white"; + }; + } + "org.kde.plasma.pager" + { + iconTasks = { + launchers = [ + "applications:org.kde.dolphin.desktop" + "applications:kitty.desktop" + "applications:librewolf.desktop" + ]; + }; + } + "org.kde.plasma.marginsseparator" + "org.kde.plasma.systemtray" + { + digitalClock = { + calendar.firstDayOfWeek = "monday"; + time.format = "24h"; + }; + } + "org.kde.plasma.showdesktop" + ]; + } + ]; + }; + }; + +} diff --git a/modules/home/desktop/shortcuts/default.nix b/modules/home/desktop/shortcuts/default.nix index 4cad745..b9860f5 100644 --- a/modules/home/desktop/shortcuts/default.nix +++ b/modules/home/desktop/shortcuts/default.nix @@ -11,14 +11,17 @@ let in { options.${namespace}.desktop.hotkeys = with types; { - enable = mkBoolOpt false "Whether or not to enable kitty."; + enable = mkBoolOpt false "Whether or not to enable custom shortcuts."; }; config = mkIf cfg.enable { programs.plasma = { enable = true; shortcuts.kwin = { - "Window Close" = [ "Meta+Shift+Q" "Alt+F4" ]; + "Window Close" = [ + "Meta+Shift+Q" + "Alt+F4" + ]; }; }; }; diff --git a/modules/home/games/runelite/default.nix b/modules/home/games/runelite/default.nix new file mode 100644 index 0000000..1cb66eb --- /dev/null +++ b/modules/home/games/runelite/default.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + namespace, + ... +}: +with lib; +with lib.${namespace}; +let + cfg = config.${namespace}.desktop.panel; +in +{ + options.${namespace}.games.runelite = with types; { + enable = mkBoolOpt false "Whether or not to enable the runelite client for runescape."; + }; + + config = mkIf cfg.enable { + home.packages = [ pkgs.runelite ]; + }; +} diff --git a/modules/nixos/cli/eza/default.nix b/modules/nixos/cli/eza/default.nix new file mode 100644 index 0000000..b2065db --- /dev/null +++ b/modules/nixos/cli/eza/default.nix @@ -0,0 +1,22 @@ +{ + config, + lib, + pkgs, + namespace, + ... +}: +with lib; +with lib.${namespace}; +let + cfg = config.${namespace}.cli.eza; +in +{ + options.${namespace}.cli.eza = with types; { + enable = mkBoolOpt false "Whether or not to use Plasma as the desktop environment."; + }; + + config = mkIf cfg.enable { + environment.systemPackages = [ pkgs.eza ]; + }; + +} diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix index b811746..afbcd01 100644 --- a/modules/nixos/desktop/plasma/default.nix +++ b/modules/nixos/desktop/plasma/default.nix @@ -1,5 +1,4 @@ { - options, config, lib, pkgs, @@ -48,9 +47,12 @@ in with pkgs.kdePackages; [ ] ++ excludePackages ++ cfg.extraExcludePackages; + networking.networkmanager.enable = true; + environment.systemPackages = with pkgs; [ pinentry-qt kdiskmark + networkmanager kdePackages.networkmanager-qt ]; }; diff --git a/modules/nixos/services/btrfs/default.nix b/modules/nixos/services/btrfs/default.nix index cbff6a3..7be3e10 100644 --- a/modules/nixos/services/btrfs/default.nix +++ b/modules/nixos/services/btrfs/default.nix @@ -12,7 +12,7 @@ let in { options.${namespace}.services.btrfs = { - enable = mkBoolOpt true "BTRFS"; + enable = mkBoolOpt false "BTRFS"; }; config = mkIf cfg.enable { diff --git a/modules/nixos/services/caddy/default.nix b/modules/nixos/services/caddy/default.nix index 04926ba..9075027 100644 --- a/modules/nixos/services/caddy/default.nix +++ b/modules/nixos/services/caddy/default.nix @@ -38,6 +38,7 @@ in not path /config.json not path /manifest.json + not path /sw.js not path /pdf.worker.min.js not path /olm.wasm diff --git a/modules/nixos/system/gnupg/default.nix b/modules/nixos/system/gnupg/default.nix new file mode 100644 index 0000000..3fc7a22 --- /dev/null +++ b/modules/nixos/system/gnupg/default.nix @@ -0,0 +1,26 @@ +{ + config, + pkgs, + lib, + namespace, + ... +}: +with lib; +with lib.${namespace}; +let + cfg = config.${namespace}.system.gnupg; +in +{ + options.${namespace}.system.gnupg = with types; { + enable = mkBoolOpt false "Whether or not to manage fonts."; + }; + + config = mkIf cfg.enable { + services.pcscd.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + }; + +} diff --git a/modules/nixos/user/default.nix b/modules/nixos/user/default.nix index f26e95c..13f6056 100644 --- a/modules/nixos/user/default.nix +++ b/modules/nixos/user/default.nix @@ -1,16 +1,7 @@ { - options, - config, pkgs, - lib, - namespace, ... }: -with lib; -with lib.${namespace}; -let - cfg = config.${namespace}.user; -in { programs.fish = { enable = true; diff --git a/systems/aarch64-linux/blarm/default.nix b/systems/aarch64-linux/blarm/default.nix index 95f4766..be11aa7 100644 --- a/systems/aarch64-linux/blarm/default.nix +++ b/systems/aarch64-linux/blarm/default.nix @@ -1,14 +1,8 @@ { - pkgs, - config, - lib, modulesPath, inputs, - namespace, ... }: -with lib; -with lib.${namespace}; { imports = with inputs.nixos-hardware.nixosModules; [ (modulesPath + "/installer/scan/not-detected.nix") @@ -53,7 +47,7 @@ with lib.${namespace}; users.users.philipp = { isNormalUser = true; - description = "Philipp Boehm"; + description = "Philipp Böhm"; extraGroups = [ "wheel" "caddy" @@ -64,17 +58,12 @@ with lib.${namespace}; ]; }; - environment.systemPackages = with pkgs; [ - neovim - wget - ]; - # Enable the OpenSSH daemon. services.openssh.enable = true; awesome-flake.services.caddy.enable = true; awesome-flake.container.technitium.enable = true; - system.stateVersion = "24.11"; # Did you read the comment? + system.stateVersion = "24.11"; } diff --git a/systems/x86_64-linux/bodenheizung/default.nix b/systems/x86_64-linux/bodenheizung/default.nix index d1e1bbc..0881d41 100644 --- a/systems/x86_64-linux/bodenheizung/default.nix +++ b/systems/x86_64-linux/bodenheizung/default.nix @@ -1,9 +1,4 @@ { - inputs, - outputs, - lib, - config, - pkgs, ... }: { @@ -14,6 +9,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.consoleMode = "max"; boot.loader.efi.canTouchEfiVariables = true; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; nixpkgs.config.allowUnfree = true; @@ -35,17 +31,23 @@ awesome-flake = { cli = { neovim.enable = true; + eza.enable = true; }; + apps = { steam.enable = true; }; + desktop.plasma.enable = true; hardware.audio.enable = true; + services = { btrfs.enable = true; }; + system.fonts.enable = true; system.fonts.emoji = true; + system.gnupg.enable = true; }; # Set your time zone