Not sure what all I have done

main
kalle 2024-12-01 19:46:30 +01:00
parent ac527695fa
commit 0de189372b
7 changed files with 433 additions and 210 deletions

View File

@ -2,17 +2,17 @@
"nodes": { "nodes": {
"ags": { "ags": {
"inputs": { "inputs": {
"astal": "astal",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1721306136, "lastModified": 1732307740,
"narHash": "sha256-VKPsIGf3/a+RONBipx4lEE4LXG2sdMNkWQu22LNQItg=", "narHash": "sha256-ZDsYdZOtg5qkK/wfLLB83B3SI+fE32S+/6Ey0ggHODM=",
"owner": "Aylur", "owner": "Aylur",
"repo": "ags", "repo": "ags",
"rev": "344ea72cd3b8d4911f362fec34bce7d8fb37028c", "rev": "81159966eb8b39b66c3efc133982fd76920c9605",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,11 +41,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721571743, "lastModified": 1731774881,
"narHash": "sha256-hat7wggtDISBJD8kTo5MTrT+IsY/Ha2MwgjmqqijoCA=", "narHash": "sha256-1Dxryiw8u2ejntxrrv3sMtIE8WHKxmlN4KeH+uMGbmc=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "601f6cf95cbe4fef02dc7faf34bba58566c914e9", "rev": "b31a6a4da8199ae3489057db7d36069a70749a56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -54,6 +54,81 @@
"type": "github" "type": "github"
} }
}, },
"astal": {
"inputs": {
"nixpkgs": [
"ags",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731952585,
"narHash": "sha256-Sh1E7sJd8JJM3PCU1ZOei/QWz97OLCENIi2rTRoaniw=",
"owner": "aylur",
"repo": "astal",
"rev": "664c7a4ddfcf48c6e8accd3c33bb94424b0e8609",
"type": "github"
},
"original": {
"owner": "aylur",
"repo": "astal",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -61,11 +136,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721534365, "lastModified": 1732482255,
"narHash": "sha256-XpZOkaSJKdOsz1wU6JfO59Rx2fqtcarQ0y6ndIOKNpI=", "narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "635563f245309ef5320f80c7ebcb89b2398d2949", "rev": "a9953635d7f34e7358d5189751110f87e3ac17da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -91,11 +166,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721330371, "lastModified": 1728669738,
"narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=", "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc", "rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -108,19 +183,21 @@
"inputs": { "inputs": {
"aquamarine": "aquamarine", "aquamarine": "aquamarine",
"hyprcursor": "hyprcursor", "hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"hyprutils": "hyprutils", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"systems": "systems_2", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1721668777, "lastModified": 1732717065,
"narHash": "sha256-QNKSZDkZ5+0a+g0wZoZfcWuH1Fy3ZvIeKg0grNdwnHc=", "narHash": "sha256-VzYiTZXneHZneIdEfr55Mt5adJ2p4AGBIJt8eVcqGc4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland", "repo": "hyprland",
"rev": "4c3b03516209a49244a8f044143c1162752b8a7a", "rev": "e9a7fb8f91d23f1ac2671e55f74234dcec2ee1c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -133,21 +210,19 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"xdph",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hyprland",
"xdph",
"systems" "systems"
] ]
}, },
"locked": { "locked": {
"lastModified": 1718746314, "lastModified": 1728345020,
"narHash": "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY=", "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "1b61f0093afff20ab44d88ad707aed8bf2215290", "rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -172,11 +247,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721324361, "lastModified": 1728168612,
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -197,11 +272,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721324102, "lastModified": 1731702627,
"narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", "narHash": "sha256-+JeO9gevnXannQxMfR5xzZtF4sYmSlWkX/BPmPx0mWk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "962582a090bc233c4de9d9897f46794280288989", "rev": "e911361a687753bbbdfe3b6a9eab755ecaf1d9e1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -222,11 +297,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721324119, "lastModified": 1726874836,
"narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -235,13 +310,36 @@
"type": "github" "type": "github"
} }
}, },
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1732412226,
"narHash": "sha256-Eb7LqtaCVgZy5Kp3pMrRTAmcnFO7HGj6lpAM2TrQzTA=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "44c9057ebbf4eb41cff08b8fc9c952b3f977656a",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1721379653, "lastModified": 1731676054,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=", "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374", "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -251,13 +349,45 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1731797254,
"narHash": "sha256-df3dJApLPhd11AlueuoN0Q4fHo/hagP75LlM5K1sz9g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1721379653, "lastModified": 1732521221,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=", "narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374", "rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -270,11 +400,11 @@
"plugin-harpoon1": { "plugin-harpoon1": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1703631439, "lastModified": 1724948422,
"narHash": "sha256-SIqssvuNnkw1YbEEElLYCHmh9OLnoHzggXNIZMb3jYI=", "narHash": "sha256-ksPNAYnaFbq7N5ifF+RFbLexLW2Lm1ey0agHLzhn9GA=",
"owner": "ThePrimeagen", "owner": "ThePrimeagen",
"repo": "harpoon", "repo": "harpoon",
"rev": "ccae1b9bec717ae284906b0bf83d720e59d12b91", "rev": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -286,11 +416,11 @@
"plugin-rainbow-delimiters-nvim": { "plugin-rainbow-delimiters-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1720388982, "lastModified": 1732056071,
"narHash": "sha256-6+MSV9pkudhf/xVdofU6syYCzViHltvDWkYvbeuEfLs=", "narHash": "sha256-nAg4XbPlJ/z6ELHKqBrp/FLRwIkiam7BAKR9eqkoxCI=",
"owner": "HiPhish", "owner": "HiPhish",
"repo": "rainbow-delimiters.nvim", "repo": "rainbow-delimiters.nvim",
"rev": "b29da4a6061a88270e875b38367d82c04c856128", "rev": "d803ba7668ba390aa4cfd3580183c982cac36fd8",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -315,17 +445,63 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1731363552,
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"ags": "ags", "ags": "ags",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixos-cosmic": "nixos-cosmic",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"plugin-harpoon1": "plugin-harpoon1", "plugin-harpoon1": "plugin-harpoon1",
"plugin-rainbow-delimiters-nvim": "plugin-rainbow-delimiters-nvim", "plugin-rainbow-delimiters-nvim": "plugin-rainbow-delimiters-nvim",
"plugin-undotree-nvim": "plugin-undotree-nvim" "plugin-undotree-nvim": "plugin-undotree-nvim"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1732328983,
"narHash": "sha256-RHt12f/slrzDpSL7SSkydh8wUE4Nr4r23HlpWywed9E=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "ed8aa5b64f7d36d9338eb1d0a3bb60cf52069a72",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
@ -341,28 +517,24 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [ "hyprlang": [
"hyprland", "hyprland",
"hyprlang" "hyprlang"
], ],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
@ -373,11 +545,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1721648131, "lastModified": 1731703417,
"narHash": "sha256-cyyxu/oj4QEFp3CVx2WeXa9T4OAUyynuBJHGkBZSxJI=", "narHash": "sha256-rheDc/7C+yI+QspYr9J2z9kQ5P9F4ATapI7qyFAe1XA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "663be9cad424b170b28b9fa8a61042d721007f3b", "rev": "8070f36deec723de71e7557441acb17e478204d3",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -24,6 +24,9 @@
plugin-harpoon1.flake = false; plugin-harpoon1.flake = false;
hyprland.url = "github:hyprwm/hyprland"; hyprland.url = "github:hyprwm/hyprland";
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = outputs =

View File

@ -1,9 +1,10 @@
{ inputs {
, outputs inputs,
, lib outputs,
, config lib,
, pkgs config,
, ... pkgs,
...
}: }:
{ {
@ -12,19 +13,19 @@
homeDirectory = "/home/kalle"; homeDirectory = "/home/kalle";
}; };
imports = imports = [
[ ../../nvim
../../nvim ../../tmux
../../tmux ../../eww
../../eww ../../hyprland
../../hyprland ../../hyprland/hyprpaper.nix
../../hyprland/hyprpaper.nix ../../ags
../../ags ];
];
hyprland = hyprland =
let let
mod = "SUPER"; in mod = "SUPER";
in
{ {
mod = mod; mod = mod;
@ -63,11 +64,11 @@
"${pkgs.ags}/bin/ags" "${pkgs.ags}/bin/ags"
"${pkgs.firefox}/bin/firefox" "${pkgs.firefox}/bin/firefox"
"${pkgs.discord}/bin/discord" "${pkgs.discord}/bin/discord"
"${pkgs.kitty}/bin/kitty"
]; ];
environment = { environment = {
XCURSOR_SIZE = "24"; XCURSOR_SIZE = "24";
QT_QPA_PLATFORMTHEME = "qt5ct";
}; };
sensitivity = 0.1; sensitivity = 0.1;
@ -75,8 +76,15 @@
layout = "dwindle"; layout = "dwindle";
layerRules = { layerRules = {
"gtk-layer-shell" = [ "blur" "ignorezero" ]; "gtk-layer-shell" = [
"notifications2" = [ "noanim" "blur" "ignorezero"]; "blur"
"ignorezero"
];
"notifications2" = [
"noanim"
"blur"
"ignorezero"
];
}; };
windowRules = { windowRules = {
@ -85,11 +93,9 @@
discord = [ "workspace name:HDMI-A-2" ]; discord = [ "workspace name:HDMI-A-2" ];
}; };
windowRulesV2 = { windowRulesV2 = {
# ULauncher # ULauncher
"class:^(ulauncher)$" = [ "class:^(ulauncher)$" = [
"forceinput"
"dimaround" "dimaround"
]; ];
}; };
@ -105,9 +111,9 @@
# bind = ALT, M, exec, xdotool key 'ALT+m' # bind = ALT, M, exec, xdotool key 'ALT+m'
# bind = ALT, B, exec, xdotool key 'ALT+b' # bind = ALT, B, exec, xdotool key 'ALT+b'
binds = { binds = {
"${mod}, return" = "exec, kitty"; "${mod}, return" = "exec, ${pkgs.kitty}/bin/kitty";
"${mod}, E" = "exec, ulauncher-toggle #wofi --show drun"; "${mod}, E" = "exec, ${pkgs.ulauncher}/bin/ulauncher-toggle #wofi --show drun";
"${mod}, Print" = "exec, bash -c \"grim -g \\\"$(slurp)\\\" - | wl-copy\""; "${mod}, Print" = "exec, ${pkgs.bash}/bin/bash -c \"grim -g \\\"$(slurp)\\\" - | wl-copy\"";
# Clipboard history # Clipboard history
# bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy # bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy
}; };
@ -120,9 +126,7 @@
}; };
nixpkgs = { nixpkgs = {
overlays = with outputs.overlays; [ overlays = with outputs.overlays; [ nvim-plugins ];
nvim-plugins
];
config = { config = {
allowUnfree = true; allowUnfree = true;
@ -130,6 +134,7 @@
permittedInsecurePackages = [ permittedInsecurePackages = [
"electron-25.9.0" "electron-25.9.0"
"electron-29.4.6"
]; ];
}; };
}; };
@ -138,6 +143,7 @@
# environment. # environment.
home.packages = with pkgs; [ home.packages = with pkgs; [
discord discord
discord-canary
vesktop vesktop
chromium chromium
httpie httpie
@ -150,9 +156,7 @@
pavucontrol pavucontrol
difftastic difftastic
sops sops
(obsidian.override { (obsidian.override { electron = electron_29-bin; })
electron = electron_29-bin;
})
unzip unzip
vlc vlc
feishin feishin
@ -187,7 +191,7 @@
qt = { qt = {
enable = true; enable = true;
style.name = "breeze-dark"; style.name = "breeze";
}; };
dconf = { dconf = {
@ -220,7 +224,7 @@
programs.kitty = { programs.kitty = {
enable = true; enable = true;
theme = "Catppuccin-Mocha"; themeFile = "Catppuccin-Mocha";
settings = { settings = {
background_opacity = "0.8"; background_opacity = "0.8";
allow_remote_control = true; allow_remote_control = true;

View File

@ -1,8 +1,9 @@
{ inputs {
, lib inputs,
, config lib,
, pkgs config,
, ... pkgs,
...
}: }:
{ {
@ -27,43 +28,45 @@
}; };
monitors = mkOption { monitors = mkOption {
type = types.listOf (types.submodule { type = types.listOf (
options = { types.submodule {
name = mkOption { options = {
type = types.str; name = mkOption {
type = types.str;
};
width = mkOption {
type = types.int;
};
height = mkOption {
type = types.int;
};
refreshRate = mkOption {
type = types.int;
default = 60;
};
x = mkOption {
type = types.int;
default = 0;
};
y = mkOption {
type = types.int;
default = 0;
};
transform = mkOption {
type = types.int;
default = 0;
};
vrr = mkOption {
type = types.int;
default = 0;
};
enabled = mkOption {
type = types.bool;
default = true;
};
}; };
width = mkOption { }
type = types.int; );
};
height = mkOption {
type = types.int;
};
refreshRate = mkOption {
type = types.int;
default = 60;
};
x = mkOption {
type = types.int;
default = 0;
};
y = mkOption {
type = types.int;
default = 0;
};
transform = mkOption {
type = types.int;
default = 0;
};
vrr = mkOption {
type = types.int;
default = 0;
};
enabled = mkOption {
type = types.bool;
default = true;
};
};
});
default = [ ]; default = [ ];
}; };
@ -137,8 +140,9 @@
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {
monitor = map monitor =
(m: map (
m:
let let
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}"; resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
position = "${toString m.x}x${toString m.y}"; position = "${toString m.x}x${toString m.y}";
@ -146,10 +150,9 @@
transform = if m.transform != 0 then ",transform,${toString m.transform}" else ""; transform = if m.transform != 0 then ",transform,${toString m.transform}" else "";
in in
"${m.name},${if m.enabled then "${resolution},${position},1${vrr}${transform}" else "disable"}" "${m.name},${if m.enabled then "${resolution},${position},1${vrr}${transform}" else "disable"}"
) ) (cfg.monitors)
(cfg.monitors) # Automatically detect newly connected monitors
# Automatically detect newly connected monitors ++ [ ",preferred,auto,auto" ];
++ [ ",preferred,auto,auto" ];
exec-once = [ exec-once = [
"${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.cliphist}/bin/cliphist store" "${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.cliphist}/bin/cliphist store"
@ -200,10 +203,10 @@
new_optimizations = "on"; new_optimizations = "on";
}; };
drop_shadow = "yes"; # drop_shadow = "yes";
shadow_range = 4; # shadow_range = 4;
shadow_render_power = 3; # shadow_render_power = 3;
"col.shadow" = "rgba(1a1a1aee)"; # "col.shadow" = "rgba(1a1a1aee)";
}; };
gestures = { gestures = {
@ -240,12 +243,9 @@
workspace = workspace =
let let
# Create one work space for each non primary monitor # Create one work space for each non primary monitor
perMonitorWorkspaces = map perMonitorWorkspaces = map (m: "name:${m.name}, monitor:${m.name}") (
(m: "name:${m.name}, monitor:${m.name}") lib.filter (m: m.name != cfg.primaryMonitor) cfg.monitors
(lib.filter );
(m: m.name != cfg.primaryMonitor)
cfg.monitors
);
# Create 10 work spaces on the primary monitor # Create 10 work spaces on the primary monitor
primaryMonitorWorkspaces = map (i: "${toString i}, monitor:${cfg.primaryMonitor}") (lib.range 1 10); primaryMonitorWorkspaces = map (i: "${toString i}, monitor:${cfg.primaryMonitor}") (lib.range 1 10);
@ -256,20 +256,18 @@
bind = bind =
let let
# Create binds to switch workspaces and move windows between them # Create binds to switch workspaces and move windows between them
workspaceBinds = workspaceBinds = lib.flatten (
lib.flatten map (
(map i:
(i: let
let k = if i == 10 then 0 else i;
k = if i == 10 then 0 else i; in
in [
[ "${cfg.mod}, ${toString k}, workspace, ${toString i}"
"${cfg.mod}, ${toString k}, workspace, ${toString i}" "${cfg.mod} SHIFT, ${toString k}, movetoworkspace, ${toString i}"
"${cfg.mod} SHIFT, ${toString k}, movetoworkspace, ${toString i}" ]
] ) (lib.range 1 10)
) );
(lib.range 1 10)
);
# Create binds to manage wiwdows # Create binds to manage wiwdows
windowManagementBinds = [ windowManagementBinds = [
@ -285,9 +283,9 @@
bindm = bindm =
let let
windowManagementBinds = [ windowManagementBinds = [
"${cfg.mod}, mouse:272, movewindow" "${cfg.mod}, mouse:272, movewindow"
"${cfg.mod}, mouse:273, resizewindow" "${cfg.mod}, mouse:273, resizewindow"
]; ];
configBinds = lib.mapAttrsToList (k: v: "${k}, ${v}") cfg.mouseBinds; configBinds = lib.mapAttrsToList (k: v: "${k}, ${v}") cfg.mouseBinds;

View File

@ -1,16 +1,17 @@
{ inputs {
, config inputs,
, pkgs config,
, ... pkgs,
...
}: }:
{ {
imports = imports = [
[ # Include the results of the hardware scan.
# Include the results of the hardware scan. ./hardware-configuration.nix
./hardware-configuration.nix ./hardware-configuration.override.nix
./hardware-configuration.override.nix # inputs.nixos-cosmic.nixosModules.default
]; ];
nix.settings = { nix.settings = {
# Enable flakes and new 'nix' command # Enable flakes and new 'nix' command
@ -18,9 +19,18 @@
# Deduplicate and optimize nix store # Deduplicate and optimize nix store
auto-optimise-store = true; auto-optimise-store = true;
# Allow me to use cachix # Allow me to use cachix
trusted-users = [ "root" "kalle" ]; trusted-users = [
substituters = ["https://hyprland.cachix.org"]; "root"
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; "kalle"
];
substituters = [
"https://hyprland.cachix.org"
"https://cosmic.cachix.org/"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
];
}; };
services.btrfs.autoScrub.enable = true; services.btrfs.autoScrub.enable = true;
@ -52,12 +62,15 @@
xkb.layout = "us"; xkb.layout = "us";
}; };
# services.desktopManager.cosmic.enable = true;
# services.displayManager.cosmic-greeter.enable = true;
# Allow flashing ZSA keyboards # Allow flashing ZSA keyboards
hardware.keyboard.zsa.enable = true; hardware.keyboard.zsa.enable = true;
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
# package = inputs.hyprland.packages.x86_64-linux.hyprland; package = inputs.hyprland.packages.x86_64-linux.hyprland;
}; };
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
@ -78,7 +91,10 @@
users.users.kalle = { users.users.kalle = {
isNormalUser = true; isNormalUser = true;
group = "kalle"; group = "kalle";
extraGroups = [ "wheel" "dialout" ]; # Enable sudo for the user. extraGroups = [
"wheel"
"dialout"
]; # Enable sudo for the user.
}; };
users.groups.kalle.gid = 1000; users.groups.kalle.gid = 1000;
@ -97,7 +113,7 @@
enableDefaultPackages = true; enableDefaultPackages = true;
packages = with pkgs; [ packages = with pkgs; [
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk-sans
noto-fonts-color-emoji noto-fonts-color-emoji
fira-code fira-code
@ -108,9 +124,18 @@
fontconfig = { fontconfig = {
defaultFonts = { defaultFonts = {
serif = [ "Noto Serif" "Symbols Nerd Font" ]; serif = [
sansSerif = [ "Noto Sans" "Symbols Nerd Font" ]; "Noto Serif"
monospace = [ "Fira Code" "Symbols Nerd Font Mono" ]; "Symbols Nerd Font"
];
sansSerif = [
"Noto Sans"
"Symbols Nerd Font"
];
monospace = [
"Fira Code"
"Symbols Nerd Font Mono"
];
}; };
}; };
}; };
@ -119,21 +144,23 @@
programs.steam = { programs.steam = {
enable = true; enable = true;
package = pkgs.steam.override { package = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [ extraPkgs =
xorg.libXcursor pkgs: with pkgs; [
xorg.libXi xorg.libXcursor
xorg.libXinerama xorg.libXi
xorg.libXScrnSaver xorg.libXinerama
libpng xorg.libXScrnSaver
libpulseaudio libpng
libvorbis libpulseaudio
stdenv.cc.cc.lib libvorbis
libkrb5 stdenv.cc.cc.lib
keyutils libkrb5
]; keyutils
extraLibraries = pkgs: with pkgs; [ ];
gperftools # Needed for tf2 to work extraLibraries =
]; pkgs: with pkgs; [
gperftools # Needed for tf2 to work
];
}; };
}; };
@ -154,4 +181,3 @@
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
} }

View File

@ -1,8 +1,9 @@
{ inputs {
, lib inputs,
, config lib,
, pkgs config,
, ... pkgs,
...
}: }:
{ {
@ -33,6 +34,7 @@
gopls gopls
vhdl-ls vhdl-ls
nixd nixd
nixfmt-rfc-style
]; ];
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [

View File

@ -103,6 +103,13 @@ require('lspconfig').lua_ls.setup {
require('lspconfig').nixd.setup { require('lspconfig').nixd.setup {
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
settings = {
nixd = {
formatting = {
command = { "nixfmt" },
},
},
},
} }
require('lspconfig').tsserver.setup { require('lspconfig').tsserver.setup {
@ -152,3 +159,14 @@ require('rust-tools').setup({
} }
}, },
}) })
-- Workaround for https://github.com/neovim/neovim/issues/30985
for _, method in ipairs({ 'textDocument/diagnostic', 'workspace/diagnostic' }) do
local default_diagnostic_handler = vim.lsp.handlers[method]
vim.lsp.handlers[method] = function(err, result, context, config)
if err ~= nil and err.code == -32802 then
return
end
return default_diagnostic_handler(err, result, context, config)
end
end