From 0241c5ce3ad359e29e17d463cba39914fdb06a20 Mon Sep 17 00:00:00 2001 From: worble Date: Sat, 8 Feb 2025 11:49:52 +0000 Subject: [PATCH] add deck home manager --- deck/home.nix | 113 ++++++++++++++++++++++++++++++++++++++ flake.lock | 18 +++--- home-manager/terminal.nix | 10 +++- starlite/home.nix | 2 +- tuxedo/configuration.nix | 3 +- 5 files changed, 132 insertions(+), 14 deletions(-) create mode 100644 deck/home.nix diff --git a/deck/home.nix b/deck/home.nix new file mode 100644 index 0000000..ed08fe0 --- /dev/null +++ b/deck/home.nix @@ -0,0 +1,113 @@ +{ pkgs, ... }: + +{ + imports = [ + ../home-manager/fonts.nix + ../home-manager/terminal.nix + ../home-manager/firefox/firefox.nix + ../home-manager/development/vscode.nix + ]; + + terminal.nixUpdateLocation = "/home/deck/Projects/nixos#starlite"; + terminal.homeUpdateLocation = "/home/deck/Projects/nixos/deck"; + + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "worble"; + home.homeDirectory = "/home/worble"; + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "24.05"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = with pkgs;[ + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + + # general + thunderbird + keepassxc + qbittorrent + libreoffice-qt + joplin-desktop + obsidian + + # media + strawberry-qt6 + jellyfin-media-player + + # comms + teamspeak_client + vesktop + ]; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + }; + + # Home Manager can also manage your environment variables through + # 'home.sessionVariables'. These will be explicitly sourced when using a + # shell provided by Home Manager. If you don't want to manage your shell + # through Home Manager then you have to manually source 'hm-session-vars.sh' + # located at either + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/worble/etc/profile.d/hm-session-vars.sh + # + home.sessionVariables = { + NIXOS_OZONE_WL = "1"; + }; + + # home.sessionPath = [ + # "$HOME/.local/bin" + # ]; + + services.nextcloud-client = { + enable = true; + startInBackground = true; + }; + + # Let Home Manager install and manage itself. + programs = { + home-manager.enable = true; + }; +} diff --git a/flake.lock b/flake.lock index 3f672da..a3baef7 100644 --- a/flake.lock +++ b/flake.lock @@ -82,11 +82,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1738806509, - "narHash": "sha256-WvAgrkWYQOXKEkrhmbtQjgMPRhm1HCDbGgg/MCDHkQE=", + "lastModified": 1738892952, + "narHash": "sha256-1mDXsXvUV+PNJHJ51HPtkbGEGwAfZVNmxtWC5OQ64h4=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "d3354254f4d75d5ae5de58ee5b03c5bdbbb627c0", + "rev": "5cbce56ae7ae89025ae7b149f2ee2bc994dd31e9", "type": "github" }, "original": { @@ -113,11 +113,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1738680400, - "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", + "lastModified": 1738824222, + "narHash": "sha256-U3SNq+waitGIotmgg/Et3J7o4NvUtP2gb2VhME5QXiw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "799ba5bffed04ced7067a91798353d360788b30d", + "rev": "550e11f27ba790351d390d9eca3b80ad0f0254e7", "type": "github" }, "original": { @@ -129,11 +129,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1738702386, - "narHash": "sha256-nJj8f78AYAxl/zqLiFGXn5Im1qjFKU8yBPKoWEeZN5M=", + "lastModified": 1738843498, + "narHash": "sha256-7x+Q4xgFj9UxZZO9aUDCR8h4vyYut4zPUvfj3i+jBHE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "030ba1976b7c0e1a67d9716b17308ccdab5b381e", + "rev": "f5a32fa27df91dfc4b762671a0e0a859a8a0058f", "type": "github" }, "original": { diff --git a/home-manager/terminal.nix b/home-manager/terminal.nix index 11bf7a1..f442a3a 100644 --- a/home-manager/terminal.nix +++ b/home-manager/terminal.nix @@ -9,6 +9,9 @@ with lib; flakeUpdateLocation = mkOption { type = types.str; }; + homeUpdateLocation = mkOption { + type = types.str; + }; }; config = { @@ -134,17 +137,18 @@ with lib; enable = true; }; - topgrade = { + topgrade = with config.terminal;{ enable = true; settings = { misc = { assume_yes = true; }; linux = { - nix_arguments = "--flake ${config.terminal.nixUpdateLocation}"; + nix_arguments = if nixUpdateLocation then "--flake ${nixUpdateLocation}" else null; + home_manager_arguments = if homeUpdateLocation then "--flake ${homeUpdateLocation}" else null; }; pre_commands = { - nix-flake-update = "sudo nix flake update --flake ${config.terminal.flakeUpdateLocation}"; + nix-flake-update = if flakeUpdateLocation then "sudo nix flake update --flake ${flakeUpdateLocation}" else null; }; }; }; diff --git a/starlite/home.nix b/starlite/home.nix index b4dd88a..bb9c3f8 100644 --- a/starlite/home.nix +++ b/starlite/home.nix @@ -59,7 +59,7 @@ # comms teamspeak_client - webcord + vesktop ]; # Home Manager is pretty good at managing dotfiles. The primary way to manage diff --git a/tuxedo/configuration.nix b/tuxedo/configuration.nix index 42d0d74..94394cb 100644 --- a/tuxedo/configuration.nix +++ b/tuxedo/configuration.nix @@ -44,9 +44,10 @@ linger = true; }; - home-manager.useGlobalPkgs = true; home-manager = { + useGlobalPkgs = true; extraSpecialArgs = { inherit inputs; }; + sharedModules = [ ]; users = { "worble" = import ./home.nix; };