Merge branch 'alpine/master' into framework/master, and update

This commit is contained in:
tristan 2025-06-24 14:33:01 +01:00
commit cfee0454fd
9 changed files with 177 additions and 157 deletions

100
flake.lock generated
View file

@ -67,6 +67,30 @@
"type": "github"
}
},
"cosmic-manager": {
"inputs": {
"flake-parts": "flake-parts",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1744387566,
"narHash": "sha256-O39zTv7LdRgr4Hw38d+eQG2LYpP75rw2XKqTGV5qzgs=",
"owner": "HeitorAugustoLN",
"repo": "cosmic-manager",
"rev": "52d3fdd080a9dd4639948687682a68282fbf0314",
"type": "github"
},
"original": {
"owner": "HeitorAugustoLN",
"repo": "cosmic-manager",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
@ -101,16 +125,16 @@
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"cosmic-manager",
"nixpkgs"
]
},
"locked": {
"lastModified": 1748821116,
"narHash": "sha256-F82+gS044J1APL0n4hH50GYdPRv/5JWm34oCJYmVKdE=",
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "49f0870db23e8c1ca0b5259734a02cd9e1e371a1",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
@ -120,6 +144,27 @@
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1749398372,
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"stylix",
@ -346,11 +391,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1749727998,
"narHash": "sha256-mHv/yeUbmL91/TvV95p+mBVahm9mdQMJoqaTVTALaFw=",
"lastModified": 1750622754,
"narHash": "sha256-kMhs+YzV4vPGfuTpD3mwzibWUE6jotw5Al2wczI0Pv8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fd487183437963a59ba763c0cc4f27e3447dd6dd",
"rev": "c7ab75210cb8cb16ddd8f290755d9558edde7ee1",
"type": "github"
},
"original": {
@ -361,11 +406,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1748693115,
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
"lastModified": 1750134718,
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
"type": "github"
},
"original": {
@ -377,7 +422,7 @@
},
"nixvim": {
"inputs": {
"flake-parts": "flake-parts",
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
@ -385,11 +430,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1749702372,
"narHash": "sha256-X+PDQ9kgt3/nOUQWSyz/8WHFOp+SyDND+bKpVufxpdE=",
"lastModified": 1750512587,
"narHash": "sha256-kZqTQEARUkkKDFhECd0MGU4wXCJcxCdh5WeM/yD6oI4=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "88f452558ea37ab8ab2052cf45b5a5653a1e556b",
"rev": "b04bcdcbba4aa648903e065ad1907a97d4f7aee9",
"type": "github"
},
"original": {
@ -435,11 +480,11 @@
]
},
"locked": {
"lastModified": 1748298102,
"narHash": "sha256-PP11GVwUt7F4ZZi5A5+99isuq39C59CKc5u5yVisU/U=",
"lastModified": 1749730855,
"narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=",
"owner": "NuschtOS",
"repo": "search",
"rev": "f8a1c221afb8b4c642ed11ac5ee6746b0fe1d32f",
"rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742",
"type": "github"
},
"original": {
@ -450,6 +495,7 @@
},
"root": {
"inputs": {
"cosmic-manager": "cosmic-manager",
"home-manager": "home-manager",
"musnix": "musnix",
"nixpkgs": "nixpkgs_2",
@ -466,11 +512,11 @@
]
},
"locked": {
"lastModified": 1749592509,
"narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=",
"lastModified": 1750119275,
"narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "50754dfaa0e24e313c626900d44ef431f3210138",
"rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2",
"type": "github"
},
"original": {
@ -487,7 +533,7 @@
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts_2",
"flake-parts": "flake-parts_3",
"git-hooks": "git-hooks",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
@ -503,11 +549,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1749768934,
"narHash": "sha256-xtWRTlYBs+wYE8NaV+mwdlVYWX0k2BkCuFdjexjEebY=",
"lastModified": 1750697672,
"narHash": "sha256-F8z6QXKRZfVKwTj8+Uw920tHGDmiRIOD+BsA6wVGOgY=",
"owner": "danth",
"repo": "stylix",
"rev": "e1cfc2b69432ac2abe95db133dcbdfc96cd3bedb",
"rev": "438a702dc2a49a48eae380623cdc04fe36ef5422",
"type": "github"
},
"original": {
@ -670,11 +716,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1748971473,
"narHash": "sha256-0Xh6sZI86Ops6u7wyDQlVvV+MvRRXIDb1r3sMnLNk9M=",
"lastModified": 1750219862,
"narHash": "sha256-wce+erYDBm6wpLJm6IJh85KYqy/NtdKp6DZQCn4YP1Q=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "5cc269976ca876674d8ccc7f40debb61e05583ab",
"rev": "18d6cd2f5a9cd1527d478d4f716e9b9ee6fb6cbb",
"type": "github"
},
"original": {

View file

@ -22,6 +22,13 @@
zen-browser = {
url = "github:youwen5/zen-browser-flake";
};
cosmic-manager = {
url = "github:HeitorAugustoLN/cosmic-manager";
inputs = {
nixpkgs.follows = "nixpkgs";
home-manager.follows = "home-manager";
};
};
};
outputs = {nixvim, ...} @ inputs: let
@ -43,12 +50,12 @@
./nixos/programs/personal.nix
./nixos/services/musnix.nix
./nixos/workstation.nix
./nixos/programs/hyprland.nix
];
home-modules = [
./home/programs/graphical.nix
./home/programs/gamer.nix
./home/programs/personal/.
./home/desktop/cosmic/.
];
};
@ -99,16 +106,6 @@
];
};
vm-hyprland =
mkConf
{
nixos-modules = [
./hardware/vm.nix
(auto-login "Hyprland")
./nixos/programs/hyprland.nix
];
};
vm-tty =
mkConf
{

View file

@ -86,6 +86,7 @@ in {
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.graphics.enable = true;
system.stateVersion = "24.05"; # don't change.
home-manager.users.${user}.imports = [

View file

@ -31,19 +31,12 @@ in {
options = ["noatime"];
};
boot.initrd.luks.devices."usbkey" = {
device = "/dev/disk/by-label/usbkey1";
};
# boot.initrd.luks.devices."usbkey" = {
# device = "/dev/disk/by-label/usbkey1";
# };
boot.initrd.luks.devices."cryptroot" = {
device = "/dev/disk/by-uuid/cc0617df-8cbf-4618-abbc-df64c96de151";
keyFileSize = 4096;
preOpenCommands = ''
mkdir -m 0755 -p /key
mount -n -o ro /dev/mapper/usbkey /key
'';
keyFile = "/key/keyfile";
preLVM = false;
};
fileSystems."/home" = {

View file

@ -2,101 +2,103 @@
pkgs,
config,
lib,
inputs,
...
}: let
inherit (config.lib.cosmic) Actions mapBinds;
SpawnTerminal = name: pkg:
Actions.Spawn (pkgs.writeShellScriptBin name "${lib.getExe config.programs.terminal} -e ${lib.getExe pkg}");
inherit (config.lib.cosmic) mkRON;
mkAction = variant: action: mkRON "enum" {
inherit variant;
value = [
(mkRON "enum" action)
];
};
in {
programs.cosmic = {
imports = [inputs.cosmic-manager.homeManagerModules.cosmic-manager];
wayland.desktopManager.cosmic = {
enable = true;
input.asDefaults = true;
input.binds = mapBinds {
# Navigation
Super. "h" = Actions.Focus "Left";
Super. "l" = Actions.Focus "Right";
Super. "j" = Actions.Focus "Down";
Super. "k" = Actions.Focus "Up";
Super. "u" = Actions.Focus "Out";
Super. "i" = Actions.Focus "In";
Super.Shift. "h" = Actions.Move "Left";
Super.Shift. "l" = Actions.Move "Right";
Super.Shift. "j" = Actions.Move "Down";
Super.Shift. "k" = Actions.Move "Up";
Super.Shift. "Right" = Actions.MoveToNextWorkspace;
Super.Shift. "Left" = Actions.MoveToPreviousWorkspace;
Super. "1" = Actions.Workspace 1;
Super. "2" = Actions.Workspace 2;
Super. "3" = Actions.Workspace 3;
Super. "4" = Actions.Workspace 4;
Super. "5" = Actions.Workspace 5;
Super.Shift. "1" = Actions.MoveToWorkspace 1;
Super.Shift. "2" = Actions.MoveToWorkspace 2;
Super.Shift. "3" = Actions.MoveToWorkspace 3;
Super.Shift. "4" = Actions.MoveToWorkspace 4;
Super.Shift. "5" = Actions.MoveToWorkspace 5;
Super. "Space" = Actions.ToggleWindowFloating;
Super. "f" = Actions.Maximize;
Super. "m" = Actions.Minimize;
Super.Shift. "x" = Actions.Close;
Super.Shift. "v" = Actions.ToggleStacking;
Super.Shift. "y" = Actions.ToggleSticky;
# System
Super. "d" = Actions.Spawn config.programs.menu.drunCommand;
Super. "Return" = Actions.Spawn config.programs.terminal;
Super. "e" = SpawnTerminal "aerc" config.programs.aerc.package;
Super. "o" = Actions.System "HomeFolder";
Super.Shift. "s" = Actions.System "Screenshot";
"XF86AudioRaiseVolume" = Actions.System "VolumeRaise";
"XF86AudioLowerVolume" = Actions.System "VolumeLower";
"XF86AudioPlay" = Actions.System "PlayPause";
"XF86AudioNext" = Actions.System "PlayNext";
"XF86AudioPrev" = Actions.System "PlayPrev";
"XF86MonBrightnessUp" = Actions.System "BrightnessUp";
"XF86MonBrightnessDown" = Actions.System "BrightnessDown";
};
background = {
displays = {
all = {
source = lib.mkDefault config.stylix.image;
};
systemActions = mkRON "map" [
{
key = mkRON "enum" "Terminal";
value = lib.getExe config.programs.terminal;
}
];
shortcuts = [
{
action = mkAction "System" "Terminal";
key = "Super+Return";
}
];
compositor = {
autotile = true;
focus_follows_cursor = true;
input_default = mkRON "optional" {
profile = (mkRON "optional" (mkRON "enum" "Flat"));
speed = 0.0;
};
};
panels = {
"Bar" = {
applets = {
start = [
wallpapers = [
{
filter_by_theme = true;
filter_method = mkRON "enum" "Lanczos";
output = "all";
rotation_frequency = 600;
sampling_method = mkRON "enum" "Alphanumeric";
scaling_mode = mkRON "enum" {
value = [
(mkRON "tuple" [
0.5
1.0
(mkRON "raw" "0.345354352")
])
];
variant = "Fit";
};
source = mkRON "enum" {
value = [ (toString config.stylix.image) ];
variant = "Path";
};
}
];
panels = [
{
anchor = mkRON "enum" "Top";
anchor_gap = false;
autohide = mkRON "optional" null;
background = mkRON "enum" "Dark";
expand_to_edges = true;
name = "Panel";
opacity = 1.0;
output = mkRON "enum" "All";
plugins_center = mkRON "optional" [
"com.system76.CosmicAppletTime"
];
plugins_wings = mkRON "optional" (mkRON "tuple" [
[
"com.system76.CosmicPanelWorkspacesButton"
"com.system76.CosmicPanelAppButton"
"com.system76.CosmicAppletWorkspaces"
];
center = [
"com.system76.CosmicAppletMinimize"
];
end = [
"com.system76.CosmicAppletTime"
]
[
"com.system76.CosmicAppletInputSources"
"com.system76.CosmicAppletStatusArea"
"com.system76.CosmicAppletTiling"
"com.system76.CosmicAppletAudio"
"com.system76.CosmicAppletNetwork"
"com.system76.CosmicAppletBattery"
"com.system76.CosmicAppletNotifications"
"com.system76.CosmicAppletStatusArea"
"com.system76.CosmicAppletBluetooth"
"com.system76.CosmicAppletPower"
];
};
options = {
size = "XS";
border_radius = 0;
};
};
};
comp.settings = {
autotile = true;
active_hint = true;
focus_follows_cursor = true;
focus_follows_cursor_delay = 0;
cursor_follows_focus = true;
descale_xwayland = true;
workspaces = {
workspace_layout = "Horizontal";
};
};
]
]);
size = mkRON "enum" "XS";
}
];
};
}

View file

@ -8,15 +8,6 @@
};
config = {
programs.alacritty = {
enable = true;
settings = {
window = {
dynamic_title = true;
};
};
};
programs.foot = {
enable = true;
};

View file

@ -3,18 +3,6 @@
config,
...
}: {
# imports = [
# inputs.nixos-cosmic.nixosModules.default
# ];
# nix.settings = {
# substituters = ["https://cosmic.cachix.org/"];
# trusted-public-keys = ["cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="];
# };
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
# services.system76-scheduler.enable = true;
# home-manager.users.${config.user}.imports = [
# (inputs.hm-cosmic.homeManagerModules.cosmic)
# ../../home/desktop/cosmic/.
# ];
}

View file

@ -5,9 +5,9 @@
name = "dashboards";
paths = map mkDashboard dashboards;
};
mkDashboard = {name, url, sha256}: pkgs.writeTextFile {
mkDashboard = {name, url, sha256, patch ? lib.id}: pkgs.writeTextFile {
inherit name;
text = builtins.readFile ( builtins.fetchurl {inherit url sha256;} );
text = patch (builtins.readFile ( builtins.fetchurl {inherit url sha256;} ));
destination = "/dash/${name}.json";
};
in {
@ -42,6 +42,8 @@ in {
name = "node-exporter";
url = "https://grafana.com/api/dashboards/1860/revisions/37/download";
sha256 = "sha256:0qza4j8lywrj08bqbww52dgh2p2b9rkhq5p313g72i57lrlkacfl";
# https://github.com/rfmoz/grafana-dashboards/issues/169
patch = builtins.replaceStrings ["$__rate_interval"] ["$__range"];
}
{
name = "synapse";

View file

@ -2,8 +2,8 @@
inherit (config.services) prometheus;
nodes = [
"alpine"
"100.106.49.128"
"zenix"
"100.106.49.128" # laptop
"100.65.29.110" # gaming pc
];
addPort = ip: "${ip}:${toString prometheus.exporters.node.port}";
in {