mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-26 18:19:11 +00:00
Compare commits
8 Commits
f2a3915e48
...
c77f495685
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c77f495685 | ||
f62ca9bdc8 | |||
51f2b966de | |||
ed45b34b50 | |||
874a915b7f | |||
48949336ff | |||
eb4352f925 | |||
ebc6ead5e3 |
4
.github/workflows/build-devcontainers.yml
vendored
4
.github/workflows/build-devcontainers.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
keep-going = true
|
||||
- name: Build
|
||||
run: |
|
||||
nix build -f ./devcontainers --impure --print-out-paths --no-link > build_paths
|
||||
nix build -f ./devcontainers --print-out-paths --no-link > build_paths
|
||||
env:
|
||||
NIXPKGS_ALLOW_UNFREE: "1"
|
||||
- name: Deploy devcontainers to GitHub registry
|
||||
@ -26,5 +26,5 @@ jobs:
|
||||
for image_archive in $(< build_paths); do
|
||||
CONTAINER_TAG=$(echo $image_archive | awk 'match($0, /docker-image-(\S+).tar.gz/, arr) {print arr[1]}')
|
||||
skopeo copy \
|
||||
"docker-archive:${image_archive}" "docker://ghcr.io/${{ github.repository }}:${CONTAINER_TAG}"
|
||||
"docker-archive:${image_archive}" "docker://ghcr.io/${{ github.repository }}"
|
||||
done
|
||||
|
@ -113,6 +113,9 @@ in {
|
||||
xdg.userDirs.extraConfig.XDG_PROJECTS_DIR =
|
||||
"${config.home.homeDirectory}/Projects";
|
||||
|
||||
# Only enable autostart inside of NixOS systems.
|
||||
xdg.autostart.enable = attrs ? nixosConfig;
|
||||
|
||||
# Set nixpkgs config both outside and inside of home-manager.
|
||||
nixpkgs.config = import ./config/nixpkgs/config.nix;
|
||||
xdg.configFile."nixpkgs/config.nix".source = ./config/nixpkgs/config.nix;
|
||||
|
@ -1,7 +1,8 @@
|
||||
# WHOA! Even browsers with extensions can be declarative!
|
||||
{ config, lib, pkgs, ... }@attrs:
|
||||
{ config, lib, pkgs, foodogsquaredLib, ... }@attrs:
|
||||
|
||||
let
|
||||
inherit (foodogsquaredLib.xdg) getXdgDesktop;
|
||||
userCfg = config.users.foo-dogsquared;
|
||||
cfg = userCfg.programs.browsers;
|
||||
|
||||
@ -95,7 +96,7 @@ in {
|
||||
{
|
||||
isDefault = true;
|
||||
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons;
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons;
|
||||
[
|
||||
aw-watcher-web
|
||||
bitwarden
|
||||
@ -206,9 +207,9 @@ in {
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
|
||||
"Bing".metaData.hidden = true;
|
||||
"Duckduckgo".metaData.hidden = true;
|
||||
"Google".metaData.alias = "@g";
|
||||
"bing".metaData.hidden = true;
|
||||
"duckduckgo".metaData.hidden = true;
|
||||
"google".metaData.alias = "@g";
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -263,6 +264,9 @@ in {
|
||||
];
|
||||
};
|
||||
|
||||
xdg.autostart.entries =
|
||||
lib.singleton (getXdgDesktop config.programs.firefox.package "firefox");
|
||||
|
||||
# Configuring Bleachbit for Firefox cleaning.
|
||||
services.bleachbit.cleaners = [
|
||||
"firefox.backup"
|
||||
@ -306,7 +310,7 @@ in {
|
||||
[{ id = "egpjdkipkomnmjhjmdamaniclmdlobbo"; }];
|
||||
};
|
||||
in lib.foldl' enableSupportedBrowser { } supportedBrowsers // {
|
||||
programs.firefox.profiles.personal.extensions =
|
||||
programs.firefox.profiles.personal.extensions.packages =
|
||||
with pkgs.nur.repos.rycee.firefox-addons;
|
||||
[ firenvim ];
|
||||
}))
|
||||
|
@ -17,7 +17,6 @@ in {
|
||||
query
|
||||
polars
|
||||
formats
|
||||
highlight
|
||||
];
|
||||
extraConfig = ''
|
||||
$env.config = $env.config | merge deep --strategy=append {
|
||||
|
@ -1,6 +1,8 @@
|
||||
{ config, lib, pkgs, ... }@attrs:
|
||||
{ config, lib, pkgs, foodogsquaredLib, ... }@attrs:
|
||||
|
||||
let
|
||||
inherit (foodogsquaredLib.xdg) getXdgDesktop;
|
||||
|
||||
userCfg = config.users.foo-dogsquared;
|
||||
cfg = userCfg.programs.terminal-emulator;
|
||||
|
||||
@ -10,16 +12,7 @@ let
|
||||
'';
|
||||
|
||||
hasNixosModuleEnable = attrs.nixosConfig.programs.wezterm.enable or false;
|
||||
in {
|
||||
options.users.foo-dogsquared.programs.terminal-emulator.enable =
|
||||
lib.mkEnableOption "foo-dogsquared's terminal emulator setup";
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
# We're just making a version of Wezterm with the default arguments if
|
||||
# the user has them.
|
||||
home.packages = let
|
||||
inherit (pkgs) wezterm hiPrio;
|
||||
weztermUserDefaultDesktop = pkgs.makeDesktopItem {
|
||||
name = "org.wezfurlong.wezterm";
|
||||
desktopName = "WezTerm (user)";
|
||||
@ -44,7 +37,20 @@ in {
|
||||
type = "Application";
|
||||
categories = [ "System" "TerminalEmulator" "Utility" ];
|
||||
};
|
||||
in {
|
||||
options.users.foo-dogsquared.programs.terminal-emulator.enable =
|
||||
lib.mkEnableOption "foo-dogsquared's terminal emulator setup";
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
# We're just making a version of Wezterm with the default arguments if
|
||||
# the user has them.
|
||||
home.packages = let
|
||||
inherit (pkgs) wezterm hiPrio;
|
||||
in [ wezterm (hiPrio weztermUserDefaultDesktop) weztermTypicalDesktop ];
|
||||
|
||||
xdg.autostart.entries =
|
||||
lib.singleton (getXdgDesktop weztermUserDefaultDesktop "org.wezfurlong.wezterm");
|
||||
}
|
||||
|
||||
(lib.mkIf (!hasNixosModuleEnable) {
|
||||
|
@ -9,7 +9,7 @@ in {
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
suites.editors.vscode.enable = true;
|
||||
programs.vscode = {
|
||||
programs.vscode.profiles.default = {
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
[
|
||||
# Additional language support.
|
||||
|
@ -120,6 +120,9 @@ in {
|
||||
(lib.mkIf cfg.spotify.enable {
|
||||
home.packages = with pkgs; [ spotify ];
|
||||
|
||||
xdg.autostart.entries =
|
||||
lib.singleton (foodogsquaredLib.xdg.getXdgDesktop pkgs.spotify "spotify");
|
||||
|
||||
sops.secrets."spotify_env" = foodogsquaredLib.sops-nix.getAsOneSecret ./secrets.bin;
|
||||
|
||||
state.ports.spotifyd.value =
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, foodogsquaredLib, ... }:
|
||||
|
||||
let
|
||||
userCfg = config.users.foo-dogsquared;
|
||||
@ -80,6 +80,9 @@ in {
|
||||
"application/vnd.anki" = [ "anki.desktop" ];
|
||||
};
|
||||
|
||||
xdg.autostart.entries =
|
||||
lib.singleton (foodogsquaredLib.xdg.getXdgDesktop pkgs.zotero "zotero");
|
||||
|
||||
users.foo-dogsquared.programs.custom-homepage.sections.services.links =
|
||||
lib.singleton {
|
||||
url = "http://localhost:${
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ dockerTools, foodogsquaredLib, nodejs, bun, pnpm }:
|
||||
|
||||
foodogsquaredLib.buildDockerImage {
|
||||
foodogsquaredLib.buildDockerImage rec {
|
||||
name = "js-backend";
|
||||
tag = name;
|
||||
contents = [ nodejs bun pnpm ];
|
||||
}
|
||||
|
@ -2,5 +2,6 @@
|
||||
|
||||
foodogsquaredLib.buildDockerImage {
|
||||
name = "ruby-on-rails";
|
||||
tag = "ror-${ruby.version}";
|
||||
contents = [ ruby bundix mruby rails-new ];
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{ dockerTools, foodogsquaredLib, rustc, cargo, rust-bindgen, rust-analyzer
|
||||
, nodejs }:
|
||||
|
||||
foodogsquaredLib.buildDockerImage {
|
||||
foodogsquaredLib.buildDockerImage rec {
|
||||
name = "rust-backend";
|
||||
tag = name;
|
||||
contents = [ cargo rust-bindgen rust-analyzer rustc nodejs ];
|
||||
}
|
||||
|
144
flake.lock
generated
144
flake.lock
generated
@ -71,11 +71,11 @@
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741921426,
|
||||
"narHash": "sha256-TV7AJaiF+9MLEkUbbX85EjplOpeEXXQhm2/14AVl+SM=",
|
||||
"lastModified": 1742523104,
|
||||
"narHash": "sha256-xszUn7/EjXpq43LO9Qgn7je+2Z8qOfpYDGLoEjo25No=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "efab809432104b6f93d3903aa47e6fbbe2939038",
|
||||
"rev": "808ae0382b035600bc8829918bfe5ea1fa63dab4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -240,11 +240,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738453229,
|
||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
||||
"lastModified": 1741352980,
|
||||
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
||||
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -281,11 +281,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738453229,
|
||||
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
||||
"lastModified": 1741352980,
|
||||
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
||||
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -379,11 +379,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741379162,
|
||||
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
|
||||
"lastModified": 1742300892,
|
||||
"narHash": "sha256-QmF0proyjXI9YyZO9GZmc7/uEu5KVwCtcdLsKSoxPAI=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
|
||||
"rev": "ea26a82dda75bee6783baca6894040c8e6599728",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -468,11 +468,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741884213,
|
||||
"narHash": "sha256-qcfEVfhCXSzIz57PFR4AtILp+X0BaiF1zx3omKkxOrI=",
|
||||
"lastModified": 1742522723,
|
||||
"narHash": "sha256-q135kPFx+BFfeAn838QfYo0pIJNYK0UFYdNa77EQMuM=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "44bddf51b76eab8b4096448e52a33964a52f7d2e",
|
||||
"rev": "1dee64f7ec304c607afeb7da8db305e6de1d064c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -490,11 +490,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739595404,
|
||||
"narHash": "sha256-0CjCfbq0yHWexOrpO06e2WU1r5JAqR6ffy1zgM3NksI=",
|
||||
"lastModified": 1742014779,
|
||||
"narHash": "sha256-I6fG1zrfdLFcp/imGZElig0BJO3YU0QEXLgvwWoOpJ8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"rev": "06519cec8fb32d219006da6eacd255504a9996af",
|
||||
"rev": "524637ef84c177661690b924bf64a1ce18072a2c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -531,11 +531,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741914680,
|
||||
"narHash": "sha256-Vu4DIZvgfWMzhUyxbHUrJaQb5232S5vuwxQ2sBcBVHk=",
|
||||
"lastModified": 1742508854,
|
||||
"narHash": "sha256-vQQTIl4+slrcu7ftVKNBql9ngBdY0dcYGujdT7zIVp0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "30cce6848a5aa41ceb5fb33185b84868cc3e9bef",
|
||||
"rev": "da0181819479ddc034a3db9a77ed21ea3bcc0668",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -585,11 +585,11 @@
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741911010,
|
||||
"narHash": "sha256-CIKnxI//A8J3N0cUXQ8HMqwpo/1igU89H8eIOrlrNts=",
|
||||
"lastModified": 1742522630,
|
||||
"narHash": "sha256-1CQvUAtfVQtbn2n3UhxeEz9WF0WPc/bhMQknDPgpySM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "6b175fb7c9d12ff039dc3e7f944256522658581d",
|
||||
"rev": "e20681475b223c163d83c811a7fc4edf28b32c98",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -601,11 +601,11 @@
|
||||
"neovim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741907753,
|
||||
"narHash": "sha256-T8iwRFgFGQyENPRm/RIIpjDxP+GDIwTlYuFcY1LexQ8=",
|
||||
"lastModified": 1742426477,
|
||||
"narHash": "sha256-MLlU8s/lVKHfYcl9g8Q4nOl3BVWc627fVII58qtL9d8=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "4f6196e91d23f17e6b25ea7356d5bbc5b87d95b6",
|
||||
"rev": "175c09bd660d0cea62288e74cea925a9b15bee55",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -642,11 +642,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741619381,
|
||||
"narHash": "sha256-koZtlJRqi0/MD/AKd0KrXLA2NuBOVzlIyAJprjzpxZE=",
|
||||
"lastModified": 1742174123,
|
||||
"narHash": "sha256-pDNzMoR6m1ZSJToZQ6XDTLVSdzIzmFl1b8Pc3f7iV6Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "66537fb185462ba9b07f4e6f2d54894a1b2d04ab",
|
||||
"rev": "2cfb4e1ca32f59dd2811d7a6dd5d4d1225f0955c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -678,11 +678,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1740947705,
|
||||
"narHash": "sha256-Co2kAD2SZalOm+5zoxmzEVZNvZ17TyafuFsD46BwSdY=",
|
||||
"lastModified": 1742217219,
|
||||
"narHash": "sha256-pLRjj0jTL1TloB0ptEwVF51IJJX8a17dSxg+gqiWb30=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "507911df8c35939050ae324caccc7cf4ffb76565",
|
||||
"rev": "83900d5154d840dfae1e0367c5290f59b9dccf03",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -693,11 +693,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1741792691,
|
||||
"narHash": "sha256-f0BVt1/cvA0DQ/q3rB+HY4g4tKksd03ZkzI4xehC2Ew=",
|
||||
"lastModified": 1742376361,
|
||||
"narHash": "sha256-VFMgJkp/COvkt5dnkZB4D2szVdmF6DGm5ZdVvTUy61c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "e1f12151258b12c567f456d8248e4694e9390613",
|
||||
"rev": "daaae13dff0ecc692509a1332ff9003d9952d7a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -724,11 +724,11 @@
|
||||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1741851582,
|
||||
"narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=",
|
||||
"lastModified": 1742422364,
|
||||
"narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6607cf789e541e7873d40d3a8f7815ea92204f32",
|
||||
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -740,11 +740,11 @@
|
||||
},
|
||||
"nixos-unstable-small": {
|
||||
"locked": {
|
||||
"lastModified": 1741874442,
|
||||
"narHash": "sha256-NBj9G0yQ7FVqC8Pi61+D6Jv2EfJ9TRpHI301fgVzQn0=",
|
||||
"lastModified": 1742450798,
|
||||
"narHash": "sha256-lfOAAaX68Ed7R6Iy2nbFAkGj6B8kHBp3nqZhgZjxR5c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "01f44b8389188522fba255168c70eda093867746",
|
||||
"rev": "b64ec1944ea40d9f3920f938e17ed39a9978c6c7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -762,11 +762,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741870048,
|
||||
"narHash": "sha256-odXRdNZGdXg1LmwlAeWL85kgy/FVHsgKlDwrvbR2BsU=",
|
||||
"lastModified": 1742481215,
|
||||
"narHash": "sha256-m7I/2UaGEFOI+Cy0RoADBi10NZt1WD5N3q2jUwPprE4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "5d76001e33ee19644a598ad80e7318ab0957b122",
|
||||
"rev": "96d7df91cce0d7cd30d1958fe1aefcb5f9bfced7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -777,11 +777,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1741851582,
|
||||
"narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=",
|
||||
"lastModified": 1742422364,
|
||||
"narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6607cf789e541e7873d40d3a8f7815ea92204f32",
|
||||
"rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -808,11 +808,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1741862977,
|
||||
"narHash": "sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB+ikn74/xQoNrGQ=",
|
||||
"lastModified": 1742388435,
|
||||
"narHash": "sha256-GheQGRNYAhHsvPxWVOhAmg9lZKkis22UPbEHlmZMthg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "cdd2ef009676ac92b715ff26630164bb88fec4e0",
|
||||
"rev": "b75693fb46bfaf09e662d09ec076c5a162efa9f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -824,11 +824,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1741865919,
|
||||
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
|
||||
"lastModified": 1742395137,
|
||||
"narHash": "sha256-WWNNjCSzQCtATpCFEijm81NNG1xqlLMVbIzXAiZysbs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
|
||||
"rev": "2a725d40de138714db4872dc7405d86457aa17ad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -877,11 +877,11 @@
|
||||
"nuschtosSearch": "nuschtosSearch"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741709061,
|
||||
"narHash": "sha256-G1YTksB0CnVhpU1gEmvO3ugPS5CAmUpm5UtTIUIPnEI=",
|
||||
"lastModified": 1742488644,
|
||||
"narHash": "sha256-vXpu7G4aupNCPlv8kAo7Y/jocfSUwglkvNx5cR0XjBo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "3a3abf11700f76738d8ad9d15054ceaf182d2974",
|
||||
"rev": "d44b33a1ea1a3e584a8c93164dbe0ba2ad4f3a13",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -897,11 +897,11 @@
|
||||
"treefmt-nix": "treefmt-nix_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741924094,
|
||||
"narHash": "sha256-NfObVoPh3ltaz/C9Nj8NaZ6YadtfoVnBGltWl6f+BQs=",
|
||||
"lastModified": 1742529237,
|
||||
"narHash": "sha256-CZIrtAOiweXQexbHh070ddb/1HbH0ymWb7CwkVqzJRo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "9ec063aa0dc0c12433705221947e3316a8991ba3",
|
||||
"rev": "6b5c2c6a13c89b965ed2d123b70e3e792667ed89",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -920,11 +920,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1738508923,
|
||||
"narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=",
|
||||
"lastModified": 1741886583,
|
||||
"narHash": "sha256-sScfYKtxp3CYv5fJcHQDvQjqBL+tPNQqS9yf9Putd+s=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "86e2038290859006e05ca7201425ea5b5de4aecb",
|
||||
"rev": "2974bc5fa3441a319fba943f3ca41f7dcd1a1467",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -997,11 +997,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741861888,
|
||||
"narHash": "sha256-ynOgXAyToeE1UdLNfrUn/hL7MN0OpIS2BtNdLjpjPf0=",
|
||||
"lastModified": 1742406979,
|
||||
"narHash": "sha256-r0aq70/3bmfjTP+JZs4+XV5SgmCtk1BLU4CQPWGtA7o=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "d016ce0365b87d848a57c12ffcfdc71da7a2b55f",
|
||||
"rev": "1770be8ad89e41f1ed5a60ce628dd10877cb3609",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1078,11 +1078,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739829690,
|
||||
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=",
|
||||
"lastModified": 1742370146,
|
||||
"narHash": "sha256-XRE8hL4vKIQyVMDXykFh4ceo3KSpuJF3ts8GKwh5bIU=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "3d0579f5cc93436052d94b73925b48973a104204",
|
||||
"rev": "adc195eef5da3606891cedf80c0d9ce2d3190808",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1153,11 +1153,11 @@
|
||||
},
|
||||
"wrapper-manager-fds": {
|
||||
"locked": {
|
||||
"lastModified": 1740994401,
|
||||
"narHash": "sha256-A1yAH8DQA3Knon7uvLjXGaMKXJQc56x0hcrSRXSfwbY=",
|
||||
"lastModified": 1742274317,
|
||||
"narHash": "sha256-AJhEE9IQGy+e+2M0sgcXkUyK6jzgzb9gfNXTpr08rUA=",
|
||||
"owner": "foo-dogsquared",
|
||||
"repo": "nix-module-wrapper-manager-fds",
|
||||
"rev": "209c9c58b7d1084f0fcadf63d56564e5e91139e1",
|
||||
"rev": "f8bbdc93a239f0f28d8cbe73ce03810952fdad04",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -13,6 +13,7 @@ in pkgs.lib.makeExtensible (self:
|
||||
trivial = callLib ./trivial.nix;
|
||||
data = callLib ./data.nix;
|
||||
math = callLib ./math.nix;
|
||||
xdg = callLib ./xdg.nix;
|
||||
|
||||
# For future references, these are the only attributes that are going to be
|
||||
# exported as part of nixpkgs overlay.
|
||||
@ -43,6 +44,7 @@ in pkgs.lib.makeExtensible (self:
|
||||
inherit (self.trivial) countAttrs filterAttrs';
|
||||
inherit (self.data) importYAML renderTeraTemplate renderMustacheTemplate;
|
||||
inherit (self.fetchers) fetchInternetArchive fetchUgeeDriver;
|
||||
inherit (self.xdg) getXdgDesktop;
|
||||
} // lib.optionalAttrs (builtins ? fetchTree) {
|
||||
flake = callLib ./flake.nix;
|
||||
|
||||
|
31
lib/xdg.nix
Normal file
31
lib/xdg.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{ pkgs, lib, self }:
|
||||
|
||||
rec {
|
||||
/**
|
||||
Naively get the absolute path of a `.desktop` file given a derivation and a
|
||||
name.
|
||||
|
||||
# Arguments
|
||||
|
||||
drv
|
||||
: The derivation.
|
||||
|
||||
name
|
||||
: The name of the `.desktop` file (without the `.desktop` extension).
|
||||
|
||||
# Type
|
||||
|
||||
```
|
||||
getXdgDesktop :: Derivation -> String -> Path
|
||||
```
|
||||
|
||||
# Example
|
||||
|
||||
```nix
|
||||
getXdgDesktop pkgs.wezterm "org.wezfurlong.wezterm"
|
||||
=> /nix/store/$HASH-wezterm-org.wezterm.wezterm.desktop
|
||||
```
|
||||
*/
|
||||
getXdgDesktop = drv: name:
|
||||
"${drv}/share/applications/${name}.desktop";
|
||||
}
|
@ -38,19 +38,11 @@ in {
|
||||
(lib.mkIf cfg.vscode.enable {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# All the niceties for developmenties.
|
||||
ms-vscode-remote.vscode-remote-extensionpack
|
||||
ms-vsliveshare.vsliveshare
|
||||
tailscale.vscode-tailscale
|
||||
|
||||
# The other niceties.
|
||||
vscode-icons-team.vscode-icons
|
||||
];
|
||||
|
||||
# Yay! Thank you!
|
||||
mutableExtensionsDir = true;
|
||||
|
||||
profiles.default = {
|
||||
userSettings = {
|
||||
# Editor configurations.
|
||||
"editor.fontFamily" = "monospace";
|
||||
@ -74,6 +66,17 @@ in {
|
||||
"gitlens.showWelcomeOnInstall" = false;
|
||||
"gitlens.plusFeatures.enabled" = false;
|
||||
};
|
||||
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# All the niceties for developmenties.
|
||||
ms-vscode-remote.vscode-remote-extensionpack
|
||||
ms-vsliveshare.vsliveshare
|
||||
tailscale.vscode-tailscale
|
||||
|
||||
# The other niceties.
|
||||
vscode-icons-team.vscode-icons
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
|
@ -2,16 +2,17 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "pop-launcher-plugin-jetbrains";
|
||||
version = "2022-08-07";
|
||||
version = "2024-04-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "oknozor";
|
||||
repo = "pop-launcher-jetbrains-plugin";
|
||||
rev = "9883ee1361c2de0bdd8ba4438a8e854303cdece6";
|
||||
sha256 = "sha256-yvkKZTulgDqr2k9M1rEEHc52IDcqMw9UA3xe/HOLD9M";
|
||||
rev = "18a3d3d32c5760ad2086380a47f684c7b12b5d68";
|
||||
hash = "sha256-lBv1jwekbod3H1ANzAEKAHDNHdRb3LD2PM1LXiLErv8=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-WuqRU+dkRVGQL+fb3utcuS4HZRTGkBtcnri7lqO9rZk=";
|
||||
cargoHash = "sha256-d54PlaKZaDhQ6PI/J1+IOMqgC/h5XUuEkULLbSTIcUw=";
|
||||
useFetchCargoVendor = true;
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 plugin.ron -t "$out/share/pop-launcher/plugins/jetbrains"
|
||||
|
@ -27,6 +27,7 @@ in {
|
||||
trivial = callLib ./trivial.nix;
|
||||
data = callLib ./data;
|
||||
math = callLib ./math.nix;
|
||||
xdg = callLib ./xdg.nix;
|
||||
|
||||
# Environment-specific subset.
|
||||
home-manager = callLib ./home-manager.nix;
|
||||
|
14
tests/lib/xdg.nix
Normal file
14
tests/lib/xdg.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ pkgs, lib, self }:
|
||||
|
||||
lib.runTests {
|
||||
testGetXdgDesktop = {
|
||||
expr = self.xdg.getXdgDesktop pkgs.wezterm "org.wezfurlong.wezterm";
|
||||
expected = "${pkgs.wezterm}/share/applications/org.wezfurlong.wezterm.desktop";
|
||||
};
|
||||
|
||||
# This should be a naive function so it should just naively get things.
|
||||
testGetXdgDesktop2 = {
|
||||
expr = self.xdg.getXdgDesktop pkgs.hello "non-existing-desktop";
|
||||
expected = "${pkgs.hello}/share/applications/non-existing-desktop.desktop";
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user