refactor(flake): avoid imports

This commit is contained in:
Artur Manuel 2025-02-04 11:10:02 +00:00
commit b57b8151ed
7 changed files with 54 additions and 63 deletions

39
flake.lock generated
View file

@ -9,11 +9,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1738499276, "lastModified": 1738535544,
"narHash": "sha256-w1DEom//LsBM+hQ7PO5p4tpTE7yBmW05Rgw94uPkIUY=", "narHash": "sha256-HR7TfT9GuQoS4bumPxhOvBuh9SaoZ98tUiyiTQ0noS4=",
"owner": "chaotic-cx", "owner": "chaotic-cx",
"repo": "nyx", "repo": "nyx",
"rev": "316741ee3d1b0f6baea9af0f177db26455bf728b", "rev": "143eaa3fa95b3681d058435f577ee48c2a646720",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -66,11 +66,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1738132439, "lastModified": 1738477724,
"narHash": "sha256-7q5vsyPQf6/aQEKAOgZ4ggv++Z2ppPSuPCGKlbPcM88=", "narHash": "sha256-S1x0F7q9cJ6EEmZsakse2Ps6Adi7NadxRtGiuWUlwT0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "f94e521c1922784c377a2cace90aa89a6b8a1011", "rev": "1936bb37b1d8597273e3611873dc09dd61b09818",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -226,11 +226,11 @@
"nixpkgs": ["chaotic", "nixpkgs"] "nixpkgs": ["chaotic", "nixpkgs"]
}, },
"locked": { "locked": {
"lastModified": 1738197605, "lastModified": 1738448366,
"narHash": "sha256-yiLnWStN5yi/BuZDKBwkxNrtejD51h5eB1eC8jAauiw=", "narHash": "sha256-4ATtQqBlgsGqkHTemta0ydY6f7JBRXz4Hf574NHQpkg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7636b248675e00d887ec0e6932c316d87f36dbf3", "rev": "18fa9f323d8adbb0b7b8b98a8488db308210ed93",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -245,11 +245,11 @@
"nixpkgs": ["chaotic", "nixpkgs"] "nixpkgs": ["chaotic", "nixpkgs"]
}, },
"locked": { "locked": {
"lastModified": 1737617533, "lastModified": 1738478597,
"narHash": "sha256-9hHaUxeRDZ5PTk7TqBbHPAjgKuBl67asaMdyehYLqFs=", "narHash": "sha256-it7lc+HRSQiLV+3CcA+c6fkr2355HyT2GGUowHdfa/E=",
"owner": "Jovian-Experiments", "owner": "Jovian-Experiments",
"repo": "Jovian-NixOS", "repo": "Jovian-NixOS",
"rev": "2dd65c3c92a4b8b1bf653657ae8648b883a4d427", "rev": "77fb0818cb42ca0db98839d47bbc6a317c286282",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -3343,11 +3343,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1738082745, "lastModified": 1738433753,
"narHash": "sha256-wuHCbF+e608ly6jwqtRK0kQOrGPNfF5HPM+k/9m3SJQ=", "narHash": "sha256-lyhEsEf5FQzV+KHVkfxIApMOFWHqyls5+llcQ/uhV6Y=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "bc10a4479821188597be042b332e2ed9b3769376", "rev": "88b901878e684e4f68f104fdbc48749f41bcccd3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -3444,16 +3444,15 @@
"systems": "systems_3" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1738503390, "lastModified": 1738663128,
"narHash": "sha256-k+lXb31oXWD2Sc8/+F4Tw9IAOEvi14e3hnx/hpBSbcE=", "narHash": "sha256-k+lXb31oXWD2Sc8/+F4Tw9IAOEvi14e3hnx/hpBSbcE=",
"owner": "amadaluzia", "owner": "notashelf",
"repo": "wallpkgs", "repo": "wallpkgs",
"rev": "bd56d6c493bc7338000842663b07362085fc1462", "rev": "6b0d216132199fa58808fde281117c1fcd892e98",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "amadaluzia", "owner": "notashelf",
"ref": "docs-fixup",
"repo": "wallpkgs", "repo": "wallpkgs",
"type": "github" "type": "github"
} }

View file

@ -33,9 +33,8 @@
}; };
wallpkgs = { wallpkgs = {
type = "github"; type = "github";
owner = "amadaluzia"; owner = "notashelf";
repo = "wallpkgs"; repo = "wallpkgs";
ref = "docs-fixup";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
pankomacs = { pankomacs = {
@ -65,16 +64,9 @@
}; };
}; };
}; };
outputs = inputs @ { outputs = inputs @ {flake-parts, ...}:
self,
flake-parts,
...
}: let
inherit ((import ./lib {inherit inputs self;}).flake) lib;
in
flake-parts.lib.mkFlake { flake-parts.lib.mkFlake {
inherit inputs; inherit inputs;
specialArgs = {inherit lib;};
} { } {
systems = ["x86_64-linux"]; systems = ["x86_64-linux"];
imports = [ imports = [

View file

@ -1,8 +1,10 @@
{ {
inputs, inputs,
lib, self,
... ...
}: { }: let
inherit (self) lib;
in {
flake = { flake = {
nixosConfigurations = builtins.mapAttrs (n: v: lib.mkHost (v // {host = n;})) { nixosConfigurations = builtins.mapAttrs (n: v: lib.mkHost (v // {host = n;})) {
python = { python = {

View file

@ -232,7 +232,7 @@ animations {
// off // off
// Slow down all animations by this factor. Values below 1 speed them up instead. // Slow down all animations by this factor. Values below 1 speed them up instead.
slowdown 0.5 slowdown 0.9
} }
// Window rules let you adjust behavior for individual windows. // Window rules let you adjust behavior for individual windows.

View file

@ -42,13 +42,13 @@ nord = {
load_theme(c, nord) load_theme(c, nord)
c.colors.webpage.preferred_color_scheme = "dark" c.colors.webpage.preferred_color_scheme = "dark"
c.tabs.position = "left" c.tabs.position = "top"
c.tabs.width = 32 c.tabs.width = 32
c.fonts.default_size = "14pt" c.fonts.default_size = "13pt"
c.fonts.default_family = "sans-serif" c.fonts.default_family = "sans-serif"
c.tabs.padding = { c.tabs.padding = {
"bottom": 6, "bottom": 4,
"top": 6, "top": 4,
"left": 6, "left": 6,
"right": 6, "right": 6,
} }

View file

@ -12,26 +12,30 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
alqueva.support.wayland = true;
xdg.portal = {
enable = true;
configPackages = [cfg.package];
extraPortals = [pkgs.xdg-desktop-portal-gnome];
config = {
niri = {
default = [
"gnome"
];
"org.freedesktop.impl.portal.Secret" = [
"gnome-keyring"
];
};
};
};
environment.systemPackages = [ environment.systemPackages = [
cfg.package cfg.package
]; ];
xdg.portal = {
config = {
niri = {
"org.freedesktop.impl.portal.Secret" = [
"gnome-keyring"
];
default = [
"gnome"
"gtk"
];
};
};
configPackages = [cfg.package];
extraPortals = [
pkgs.xdg-desktop-portal-gnome
pkgs.xdg-desktop-portal-gtk
];
};
alqueva.support.wayland = true;
services.gnome.gnome-keyring.enable = true;
}; };
} }

View file

@ -1,7 +1,6 @@
{ {
config, config,
lib, lib,
pkgs,
... ...
}: let }: let
cfg = config.alqueva.support; cfg = config.alqueva.support;
@ -11,19 +10,14 @@ in {
wayland = mkEnableOption "wayland support"; wayland = mkEnableOption "wayland support";
}; };
config = lib.mkIf cfg.wayland { config = lib.mkIf cfg.wayland {
xdg.portal = lib.mkDefault { xdg.portal = {
enable = true; enable = true;
config.common = { xdgOpenUsePortal = true;
default = ["gtk"];
};
extraPortals = [pkgs.xdg-desktop-portal-gtk];
}; };
environment.sessionVariables = { environment.sessionVariables = {
"NIXOS_OZONE_WL" = "1"; "NIXOS_OZONE_WL" = "1";
"QT_QPA_PLATFORM" = "wayland"; "QT_QPA_PLATFORM" = "wayland";
}; };
services.gnome.gnome-keyring.enable = true;
}; };
} }