diff --git a/flake.nix b/flake.nix index dba152e..ee6e423 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,9 @@ src = ./.; # "src" must point to the root of the flake. snowfall = { + # "root" can be used, to tell Snowfall Lib where to look for Nix files. + # root = ./nix; + # Namespace for this flake's packages, library and overlays. namespace = "puzzlevision"; @@ -55,7 +58,7 @@ }; channels-config = { - allowUnfree = true; + allowUnfree = true; # Allow unfree packages. }; # Apply some NixOS modules globally. diff --git a/homes/x86_64-linux/cyn@absolutesolver/default.nix b/homes/x86_64-linux/cyn@absolutesolver/default.nix index cb1d7d7..6ecc69f 100644 --- a/homes/x86_64-linux/cyn@absolutesolver/default.nix +++ b/homes/x86_64-linux/cyn@absolutesolver/default.nix @@ -1,6 +1,7 @@ { lib, pkgs, + inputs, namespace, ... }: with lib; with lib.${namespace}; diff --git a/homes/x86_64-linux/jo@puzzlevision/apps/gnome.nix b/homes/x86_64-linux/jo@puzzlevision/apps/gnome.nix index fa86efc..420599a 100644 --- a/homes/x86_64-linux/jo@puzzlevision/apps/gnome.nix +++ b/homes/x86_64-linux/jo@puzzlevision/apps/gnome.nix @@ -1,5 +1,8 @@ { + lib, pkgs, + inputs, + config, ... }: { home.packages = with pkgs.gnomeExtensions; [ diff --git a/homes/x86_64-linux/jo@puzzlevision/apps/vscodium.nix b/homes/x86_64-linux/jo@puzzlevision/apps/vscodium.nix index 3d984e6..df73f29 100644 --- a/homes/x86_64-linux/jo@puzzlevision/apps/vscodium.nix +++ b/homes/x86_64-linux/jo@puzzlevision/apps/vscodium.nix @@ -1,12 +1,15 @@ { + lib, pkgs, + inputs, + config, ... }: { programs.vscode = { enable = true; package = pkgs.vscodium; extensions = with pkgs.vscode-extensions; [ - # wakatime.vscode-wakatime # Wakatime for coding statistics + wakatime.vscode-wakatime # Wakatime for coding statistics vue.volar # Vue support svelte.svelte-vscode # Svelte support pkief.material-icon-theme # Material icons @@ -17,10 +20,5 @@ catppuccin.catppuccin-vsc # Catppuccin theme jnoortheen.nix-ide # Nix language support ]; - userSettings = { - "nix.enableLanguageServer" = true; - "nix.serverPath" = "nil"; - "workbench.colorTheme" = "Catppuccin Macchiato"; - }; }; } \ No newline at end of file diff --git a/homes/x86_64-linux/jo@puzzlevision/default.nix b/homes/x86_64-linux/jo@puzzlevision/default.nix index a707122..22ba317 100644 --- a/homes/x86_64-linux/jo@puzzlevision/default.nix +++ b/homes/x86_64-linux/jo@puzzlevision/default.nix @@ -1,7 +1,22 @@ { + # Snowfall Lib provides a customized `lib` instance with access to your flake's library + # as well as the libraries available from your flake's inputs. lib, + # Instance of `pkgs` with overlays and custom packages applied. pkgs, - namespace, + # All flake inputs. + inputs, + + # Additional metadata, provided by Snowfall Lib. + namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". + home, # The home architecture for this host (eg. `x86_64-linux`). + target, # The Snowfall Lib target for this home (eg. `x86_64-home`). + format, # A normalized name for the home target (eg. `home`). + virtual, # A boolean to determine whether this home is a virtual target using nixos-generators. + host, # The host name for this home. + + # All other arguments come from the home home. + config, ... }: with lib; with lib.${namespace}; { @@ -42,8 +57,6 @@ bun devenv python39 - nil - zed-editor ### Rust development specific rustup @@ -60,5 +73,7 @@ sidequest ]; + #puzzlevision.apps.zed-editor.enable = true; + home.stateVersion = "24.05"; } diff --git a/modules/home/apps/development/zed-editor/default.nix b/modules/home/apps/development/zed-editor/default.nix new file mode 100644 index 0000000..1c565c3 --- /dev/null +++ b/modules/home/apps/development/zed-editor/default.nix @@ -0,0 +1,26 @@ +{ + lib, + pkgs, + inputs, + namespace, + config, + ... +}: with lib; with lib.${namespace}; +let + cfg = config.apps.zed-editor; + + zed-fhs = pkgs.buildFHSUserEnv { + name = "zed"; + targetPkgs = pkgs: + with pkgs; [ + zed-editor + ]; + runScript = "zed"; + }; +in { + options.apps.zed-editor = { enable = mkEnableOption "zed-editor"; }; + + config = mkIf cfg.enable { + home.packages = [zed-fhs]; + }; +} diff --git a/modules/home/common/ssh/default.nix b/modules/home/common/ssh/default.nix index e19c755..153adc0 100644 --- a/modules/home/common/ssh/default.nix +++ b/modules/home/common/ssh/default.nix @@ -1,8 +1,41 @@ { + lib, pkgs, + inputs, + namespace, + config, ... -}: { +}: let + sshDir = "${config.home.homeDirectory}/.ssh"; +in { home.packages = with pkgs; [ openssh ]; + + programs.ssh = { + enable = true; + extraConfig = '' + AddKeysToAgent yes + ''; + + matchBlocks = { + "github.com" = { + identityFile = "${sshDir}/id_ed25519"; + identitiesOnly = true; + user = "git"; + }; + + "gitlab.com" = { + identityFile = "${sshDir}/id_ed25519"; + identitiesOnly = true; + user = "git"; + }; + + "bitbucket.org" = { + identityFile = "${sshDir}/id_ed25519"; + identitiesOnly = true; + user = "git"; + }; + }; + }; } diff --git a/modules/home/themes/catppuccin/gnome/default.nix b/modules/home/themes/catppuccin/gnome/default.nix index 8eb9a80..93ed65c 100644 --- a/modules/home/themes/catppuccin/gnome/default.nix +++ b/modules/home/themes/catppuccin/gnome/default.nix @@ -156,8 +156,8 @@ in }; "org/gnome/desktop/background" = { - picture-uri = lib.snowfall.fs.get-file "resources/wallpapers/catppuccin_blue_cat.png"; - picture-uri-dark = lib.snowfall.fs.get-file "resources/wallpapers/catppuccin_blue_cat.png"; + picture-uri = lib.snowfall.fs.get-file "resources/wallpapers/blossoms.png"; + picture-uri-dark = lib.snowfall.fs.get-file "resources/wallpapers/blossoms.png"; }; "org/gnome/desktop/interface" = { diff --git a/modules/nixos/archetypes/server/default.nix b/modules/nixos/archetypes/server/default.nix index 6d44abb..7a82fa2 100644 --- a/modules/nixos/archetypes/server/default.nix +++ b/modules/nixos/archetypes/server/default.nix @@ -1,5 +1,6 @@ { lib, + pkgs, namespace, config, ... diff --git a/modules/nixos/archetypes/workstation/default.nix b/modules/nixos/archetypes/workstation/default.nix index 8bf0eac..2dad545 100644 --- a/modules/nixos/archetypes/workstation/default.nix +++ b/modules/nixos/archetypes/workstation/default.nix @@ -1,5 +1,6 @@ { lib, + pkgs, namespace, config, ... diff --git a/modules/nixos/common/audio/default.nix b/modules/nixos/common/audio/default.nix index 3528bb8..d9c4298 100644 --- a/modules/nixos/common/audio/default.nix +++ b/modules/nixos/common/audio/default.nix @@ -1,5 +1,6 @@ { lib, + inputs, namespace, config, ... diff --git a/modules/nixos/common/fonts/default.nix b/modules/nixos/common/fonts/default.nix index c60ad49..99e272e 100644 --- a/modules/nixos/common/fonts/default.nix +++ b/modules/nixos/common/fonts/default.nix @@ -3,6 +3,7 @@ pkgs, namespace, config, + options, ... }: with lib; with lib.${namespace}; let diff --git a/modules/nixos/common/grub/default.nix b/modules/nixos/common/grub/default.nix index 5031ed2..6b24e01 100644 --- a/modules/nixos/common/grub/default.nix +++ b/modules/nixos/common/grub/default.nix @@ -1,6 +1,15 @@ { lib, - namespace, + pkgs, + inputs, + + namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". + system, # The system architecture for this host (eg. `x86_64-linux`). + target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). + format, # A normalized name for the system target (eg. `iso`). + virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. + systems, # An attribute map of your defined hosts. + config, ... }: with lib; with lib.${namespace}; diff --git a/modules/nixos/common/hardware/default.nix b/modules/nixos/common/hardware/default.nix index 23106e8..bf98b51 100644 --- a/modules/nixos/common/hardware/default.nix +++ b/modules/nixos/common/hardware/default.nix @@ -1,5 +1,6 @@ { lib, + inputs, namespace, config, ... diff --git a/modules/nixos/common/locale/default.nix b/modules/nixos/common/locale/default.nix index 7ac250a..55e3a13 100644 --- a/modules/nixos/common/locale/default.nix +++ b/modules/nixos/common/locale/default.nix @@ -1,5 +1,6 @@ { lib, + inputs, namespace, config, ... diff --git a/modules/nixos/common/networking/default.nix b/modules/nixos/common/networking/default.nix index 8ee7cc5..2c00fb8 100644 --- a/modules/nixos/common/networking/default.nix +++ b/modules/nixos/common/networking/default.nix @@ -1,6 +1,14 @@ { lib, - namespace, + pkgs, + inputs, + + namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". + system, # The system architecture for this host (eg. `x86_64-linux`). + target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). + format, # A normalized name for the system target (eg. `iso`). + virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. + systems, # An attribute map of your defined hosts. config, ... diff --git a/modules/nixos/common/nix/default.nix b/modules/nixos/common/nix/default.nix index 2d95834..b35f5a1 100644 --- a/modules/nixos/common/nix/default.nix +++ b/modules/nixos/common/nix/default.nix @@ -1,6 +1,7 @@ { lib, pkgs, + inputs, namespace, config, ... @@ -31,11 +32,6 @@ in { options = "--delete-older-than 3d"; }; - extraOptions = '' - extra-substituters = https://devenv.cachix.org - extra-trusted-public-keys = devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= - ''; - package = mkIf cfg.use-lix pkgs.lix; # Enable LIX }; }; diff --git a/modules/nixos/common/shell/default.nix b/modules/nixos/common/shell/default.nix index 5e5f04b..183718e 100644 --- a/modules/nixos/common/shell/default.nix +++ b/modules/nixos/common/shell/default.nix @@ -1,8 +1,16 @@ { lib, - namespace, - config, pkgs, + inputs, + + namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". + system, # The system architecture for this host (eg. `x86_64-linux`). + target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). + format, # A normalized name for the system target (eg. `iso`). + virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. + systems, # An attribute map of your defined hosts. + + config, ... }: with lib; with lib.${namespace}; let diff --git a/modules/nixos/desktop/gnome/default.nix b/modules/nixos/desktop/gnome/default.nix index ddbcb30..64c1e20 100644 --- a/modules/nixos/desktop/gnome/default.nix +++ b/modules/nixos/desktop/gnome/default.nix @@ -1,7 +1,15 @@ { lib, pkgs, - namespace, + inputs, + + namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". + system, # The system architecture for this host (eg. `x86_64-linux`). + target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). + format, # A normalized name for the system target (eg. `iso`). + virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. + systems, # An attribute map of your defined hosts. + config, ... }: with lib; with lib.${namespace}; diff --git a/modules/nixos/desktop/plasma/default.nix b/modules/nixos/desktop/plasma/default.nix index 628f118..886f7de 100644 --- a/modules/nixos/desktop/plasma/default.nix +++ b/modules/nixos/desktop/plasma/default.nix @@ -1,6 +1,15 @@ { lib, - namespace, + pkgs, + inputs, + + namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal". + system, # The system architecture for this host (eg. `x86_64-linux`). + target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). + format, # A normalized name for the system target (eg. `iso`). + virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. + systems, # An attribute map of your defined hosts. + config, ... }: with lib; with lib.${namespace}; diff --git a/systems/x86_64-linux/absolutesolver/default.nix b/systems/x86_64-linux/absolutesolver/default.nix index e9572d8..fc6a6e9 100644 --- a/systems/x86_64-linux/absolutesolver/default.nix +++ b/systems/x86_64-linux/absolutesolver/default.nix @@ -3,6 +3,7 @@ pkgs, inputs, namespace, + config, ... }: with lib; with lib.${namespace}; {