From 2600e6a9fbaf077ca65c78240f95be8604e0b6de Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Fri, 24 Nov 2023 14:32:58 +0100 Subject: [PATCH] update ultrastable, misc gnome stuff --- modules/desktop/gnome.nix | 5 +- modules/nixpkgs.nix | 2 +- modules/users/vinzenz-home.nix | 370 +++++++++++++++++---------------- 3 files changed, 194 insertions(+), 183 deletions(-) diff --git a/modules/desktop/gnome.nix b/modules/desktop/gnome.nix index 2931202..726ea99 100644 --- a/modules/desktop/gnome.nix +++ b/modules/desktop/gnome.nix @@ -25,7 +25,7 @@ in { tracker-miners.enable = false; tracker.enable = false; sushi.enable = true; - #gnome-remote-desktop.enable = true; + gnome-remote-desktop.enable = true; }; }; @@ -41,12 +41,11 @@ in { epiphany # web browser evince # document viewer geary # email client - seahorse # password manager + #seahorse # password manager gnome-clocks gnome-maps gnome-weather gnome-music - pkgs.gnome-connections ]; }; } diff --git a/modules/nixpkgs.nix b/modules/nixpkgs.nix index c9e6648..0b47cdc 100644 --- a/modules/nixpkgs.nix +++ b/modules/nixpkgs.nix @@ -4,7 +4,7 @@ ... }: let unstable-commit-sha = "fa804edfb7869c9fb230e174182a8a1a7e512c40"; - ultrastable-commit-sha = "34bdaaf1f0b7fb6d9091472edc968ff10a8c2857"; + ultrastable-commit-sha = "8f1180704ac35baded1a74164365ac7cdfba6f38"; in { options.my.allowUnfreePackages = lib.mkOption { type = lib.types.listOf lib.types.str; diff --git a/modules/users/vinzenz-home.nix b/modules/users/vinzenz-home.nix index 6da8e6c..f2aa8ca 100644 --- a/modules/users/vinzenz-home.nix +++ b/modules/users/vinzenz-home.nix @@ -1,193 +1,205 @@ { config, + osConfig, pkgs, + lib, ... -}: { - home.packages = with pkgs; [ - keepassxc - unstable.insync - telegram-desktop - simple-scan - wireguard-tools - element-desktop - etcher - iotop - lsof - wirelesstools - thefuck - dotnet-sdk_7 - ultrastable.jetbrains.rider - alejandra - arduino - uucp - screen - ultrastable.jetbrains.pycharm-professional - kdiff3 - docker - youtube-music +}: let + isGnomeEnabled = osConfig.my.desktop.enableGnome; +in + lib.mkMerge [ + { + home.packages = with pkgs; [ + keepassxc + unstable.insync + telegram-desktop + simple-scan + wireguard-tools + element-desktop + etcher + iotop + lsof + wirelesstools + thefuck + dotnet-sdk_7 + ultrastable.jetbrains.rider + alejandra + arduino + uucp + screen + ultrastable.jetbrains.pycharm-professional + kdiff3 + docker + youtube-music - cargo - rustc - gcc - rustfmt - clippy - cargo-generate - ]; + cargo + rustc + gcc + rustfmt + clippy + cargo-generate + ]; - programs = { - home-manager.enable = true; + programs = { + home-manager.enable = true; - fzf.enable = true; - mangohud.enable = true; + fzf.enable = true; + mangohud.enable = true; - zsh = { - initExtra = '' - eval "$(direnv hook zsh)"; - eval $(thefuck --alias); - ''; + zsh = { + 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-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"; + 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" "thefuck"]; + }; + }; + + 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 + #samuelcolvin.jinjahtml + editorconfig.editorconfig + #KnisterPeter.vscode-github + yzhang.markdown-all-in-one + redhat.vscode-yaml + pkief.material-icon-theme + mhutchie.git-graph + rust-lang.rust-analyzer + bungcip.better-toml + ]; + 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; + }; + }; + + 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"; + } + ]; + }; + + exa = { + enable = true; + git = true; + icons = true; + enableAliases = true; + extraOptions = [ + "--group-directories-first" + "--header" + ]; + }; + + micro = { + enable = true; + settings = { + colorcolumn = 120; + hlsearch = true; + savecursor = true; + saveundo = true; + scrollbar = true; + smartpaste = true; + }; + }; + + # checked https://rycee.gitlab.io/home-manager/options.html until "programs.notmuch" }; - history = { - size = 10000; - path = "${config.xdg.dataHome}/zsh/history"; - expireDuplicatesFirst = true; - }; - - oh-my-zsh = { + editorconfig = { enable = true; - theme = "agnoster"; - plugins = ["git" "sudo" "docker" "systemadmin" "thefuck"]; + 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; + }; + }; }; - }; - - 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 - #samuelcolvin.jinjahtml - editorconfig.editorconfig - #KnisterPeter.vscode-github - yzhang.markdown-all-in-one - redhat.vscode-yaml - pkief.material-icon-theme - mhutchie.git-graph - rust-lang.rust-analyzer - bungcip.better-toml + } + (lib.mkIf isGnomeEnabled { + home.packages = with pkgs; [ + fractal ]; - 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; - }; - }; - - 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"; - } - ]; - }; - - exa = { - enable = true; - git = true; - icons = true; - enableAliases = true; - extraOptions = [ - "--group-directories-first" - "--header" - ]; - }; - - micro = { - enable = true; - settings = { - colorcolumn = 120; - hlsearch = true; - savecursor = true; - saveundo = true; - scrollbar = true; - smartpaste = true; - }; - }; - - # checked https://rycee.gitlab.io/home-manager/options.html until "programs.notmuch" - }; - - 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; - }; - }; - }; -} + }) + ]