This commit is contained in:
Vivian 2024-07-07 10:08:10 +02:00
parent a3283256b4
commit cfc82b3817
26 changed files with 172 additions and 1673 deletions

View file

@ -1,4 +1,5 @@
{ lib, inputs, pkgs, ... }: {
{ lib, inputs, ... }:
{
imports = [
./users
./modules
@ -7,8 +8,14 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
sharedModules = [ ./hm-modules inputs.nixvim.homeManagerModules.nixvim ];
extraSpecialArgs = {
inherit inputs;
};
sharedModules = [
./hm-modules
inputs.nixvim.homeManagerModules.nixvim
inputs.catppuccin.homeManagerModules.catppuccin
];
};
virtualisation.oci-containers.backend = lib.mkDefault "podman";
@ -29,12 +36,15 @@
# Nix Settings
nix = {
registry.nixpkgs.flake = inputs.nixpkgs;
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
# registry.nixpkgs.flake = inputs.nixpkgs;
# nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
# package = pkgs.nixUnstable;
settings = {
auto-optimise-store = true;
trusted-users = [ "root" "vivian" ];
trusted-users = [
"root"
"vivian"
];
substituters = [
"https://nix-community.cachix.org"
"https://nixpkgs-review-bot.cachix.org"

View file

@ -26,6 +26,11 @@ in
enable = mkEnableOption "catppuccin";
};
config = mkIf cfg.enable {
catppuccin = {
flavor = "frappe";
accent = "pink";
};
home.pointerCursor = {
name = "Bibata_Ghost";
size = 24;
@ -39,14 +44,15 @@ in
gtk = {
enable = true;
theme = {
name = "Catppuccin-Frappe-Standard-Pink-Dark";
package = pkgs.catppuccin-gtk.override {
accents = [ "pink" ];
variant = "frappe";
size = "standard";
};
};
# theme = {
# name = "Catppuccin-Frappe-Standard-Pink-Dark";
# package = pkgs.catppuccin-gtk.override {
# accents = [ "pink" ];
# variant = "frappe";
# size = "standard";
# };
# };
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme.override { color = "violet"; };
@ -56,31 +62,34 @@ in
};
};
qt = {
enable = true;
platformTheme = "qtct";
style.name = "kvantum";
};
# qt = {
# enable = true;
# # platformTheme = "qtct";
# style.name = "kvantum";
# platformTheme.name = "kvantum";
# };
xdg.configFile = {
"Kvantum/kvantum.kvconfig".text = ''
[General]
theme=Catppuccin-Frappe-Pink
'';
};
# xdg.configFile = {
# "Kvantum/kvantum.kvconfig".text = ''
# [General]
# theme=Catppuccin-Frappe-Pink
# '';
# };
home.packages = with pkgs; [
(catppuccin-kvantum.override {
accent = "Pink";
variant = "Frappe";
})
# (catppuccin-kvantum.override {
# accent = "Pink";
# variant = "Frappe";
# })
];
programs.mako.extraConfig = readFile "${mako}/src/frappe";
programs.starship.settings = {
palette = "catppuccin_frappe";
} //fromTOML (readFile "${starship}/palettes/frappe.toml");
services.mako.catppuccin.enable = true;
# programs.mako.extraConfig = readFile "${mako}/src/frappe";
#
# programs.starship.settings = {
# palette = "catppuccin_frappe";
# } //fromTOML (readFile "${starship}/palettes/frappe.toml");
#
programs.vscode = {
userSettings."workbench.colorTheme" = "Catppuccin Frappé";

View file

@ -37,6 +37,7 @@ with lib;
conceallevel = 2;
expandtab = true;
tabstop = 2;
shiftwidth = 2;
smartindent = true;
};

View file

@ -1,8 +1,8 @@
{ config, pkgs, lib, ... }:
with lib;
let cfg = config.services.flood;
let cfg = config.services.v.flood;
in {
options.services.flood = {
options.services.v.flood = {
enable = mkEnableOption "flood";
user = mkOption {

216
flake.lock generated
View file

@ -40,6 +40,21 @@
"type": "gitlab"
}
},
"catppuccin": {
"locked": {
"lastModified": 1720311994,
"narHash": "sha256-HsDHgJaozek5fExjwmN47QWbDtDnGLWJT4uOOtLEmvA=",
"owner": "catppuccin",
"repo": "nix",
"rev": "0ec7ee23269bcbe3e5f23de743fbc8e1383a3315",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "nix",
"type": "github"
}
},
"colmena": {
"inputs": {
"flake-compat": "flake-compat_2",
@ -90,11 +105,11 @@
]
},
"locked": {
"lastModified": 1711299236,
"narHash": "sha256-6/JsyozOMKN8LUGqWMopKTSiK8N79T8Q+hcxu2KkTXg=",
"lastModified": 1718474113,
"narHash": "sha256-UKrfy/46YF2TRnxTtKCYzqf2f5ZPRRWwKCCJb7O5X8U=",
"owner": "ipetkov",
"repo": "crane",
"rev": "880573f80d09e18a11713f402b9e6172a085449f",
"rev": "0095fd8ea00ae0a9e6014f39c375e40c2fbd3386",
"type": "github"
},
"original": {
@ -110,11 +125,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1715699772,
"narHash": "sha256-sKhqIgucN5sI/7UQgBwsonzR4fONjfMr9OcHK/vPits=",
"lastModified": 1718194053,
"narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "b3ea6f333f9057b77efd9091119ba67089399ced",
"rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
"type": "github"
},
"original": {
@ -300,11 +315,11 @@
]
},
"locked": {
"lastModified": 1709336216,
"narHash": "sha256-Dt/wOWeW6Sqm11Yh+2+t0dfEWxoMxGBvv3JpIocFl9E=",
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "f7b3c975cf067e56e7cda6cb098ebe3fb4d74ca2",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
@ -321,11 +336,11 @@
]
},
"locked": {
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"lastModified": 1719877454,
"narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"rev": "4e3583423212f9303aa1a6337f8dffb415920e4f",
"type": "github"
},
"original": {
@ -369,7 +384,7 @@
},
"flake-utils_10": {
"inputs": {
"systems": "systems_10"
"systems": "systems_9"
},
"locked": {
"lastModified": 1681202837,
@ -474,7 +489,7 @@
},
"flake-utils_7": {
"inputs": {
"systems": "systems_7"
"systems": "systems_6"
},
"locked": {
"lastModified": 1705309234,
@ -492,7 +507,7 @@
},
"flake-utils_8": {
"inputs": {
"systems": "systems_8"
"systems": "systems_7"
},
"locked": {
"lastModified": 1701680307,
@ -510,7 +525,7 @@
},
"flake-utils_9": {
"inputs": {
"systems": "systems_9"
"systems": "systems_8"
},
"locked": {
"lastModified": 1710146030,
@ -540,11 +555,11 @@
]
},
"locked": {
"lastModified": 1717664902,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
"lastModified": 1719259945,
"narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
"rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07",
"type": "github"
},
"original": {
@ -625,11 +640,11 @@
]
},
"locked": {
"lastModified": 1717525419,
"narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=",
"lastModified": 1720327769,
"narHash": "sha256-kAsg3Lg4YKKpGw+f1W2s5hzjP8B0y/juowvjK8utIag=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b",
"rev": "6b7ce96f34b324e4e104abc30d06955d216bac71",
"type": "github"
},
"original": {
@ -646,11 +661,11 @@
]
},
"locked": {
"lastModified": 1717525419,
"narHash": "sha256-5z2422pzWnPXHgq2ms8lcCfttM0dz+hg+x1pCcNkAws=",
"lastModified": 1719827439,
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a7117efb3725e6197dd95424136f79147aa35e5b",
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
"type": "github"
},
"original": {
@ -672,11 +687,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1717686691,
"narHash": "sha256-LF4zVaSsJ83wq6j+4lm/olK2V71KAJHNJbD42mF+fr8=",
"lastModified": 1719818887,
"narHash": "sha256-Bogl1pJlgby7OpR16jp8zwOWV7FHRxCsnNxHcisyIq0=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "990e300ef9abe0eb8c86388683f8d7465e335626",
"rev": "0e6457c98547ec8866714d4222545e7e8c1ae429",
"type": "github"
},
"original": {
@ -692,20 +707,20 @@
"nixpkgs": [
"nixpkgs"
],
"utils": "utils_2"
"nixpkgs-24_05": "nixpkgs-24_05"
},
"locked": {
"lastModified": 1717515088,
"narHash": "sha256-nWOLpPA7+k7V1OjXTuxdsVd5jeeI0b13Di57wvnqkic=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "0d51a32e4799d081f260eb4db37145f5f4ee7456",
"type": "gitlab"
"lastModified": 1718697807,
"narHash": "sha256-Enla61WFisytTYbWygPynEbu8vozjeGc6Obkj2GRj7o=",
"ref": "refs/heads/master",
"rev": "290a995de5c3d3f08468fa548f0d55ab2efc7b6b",
"revCount": 591,
"type": "git",
"url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"type": "gitlab"
"type": "git",
"url": "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git"
}
},
"microvm": {
@ -715,11 +730,11 @@
"spectrum": "spectrum"
},
"locked": {
"lastModified": 1717441449,
"narHash": "sha256-juxjgmLnFbl+/hhIO2cVtIa6caCO4pLKlZWUMwAOznM=",
"lastModified": 1720034501,
"narHash": "sha256-fzZpuVnhw5uOtA4OuXw3a+Otpy8C+QV0Uu5XfhGEPSg=",
"owner": "astro",
"repo": "microvm.nix",
"rev": "e3a4dd5b381fb580804105594cc9c71dc45abdb5",
"rev": "a808af7775f508a2afedd1e4940a382fe1194f21",
"type": "github"
},
"original": {
@ -736,11 +751,11 @@
]
},
"locked": {
"lastModified": 1716993688,
"narHash": "sha256-vo5k2wQekfeoq/2aleQkBN41dQiQHNTniZeVONWiWLs=",
"lastModified": 1719845423,
"narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "c0d5b8c54d6828516c97f6be9f2d00c63a363df4",
"rev": "ec12b88104d6c117871fad55e931addac4626756",
"type": "github"
},
"original": {
@ -751,11 +766,11 @@
},
"nixlib": {
"locked": {
"lastModified": 1712450863,
"narHash": "sha256-K6IkdtMtq9xktmYPj0uaYc8NsIqHuaAoRBaMgu9Fvrw=",
"lastModified": 1719708727,
"narHash": "sha256-XFNKtyirrGNdehpg7lMNm1skEcBApjqGhaHc/OI95HY=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "3c62b6a12571c9a7f65ab037173ee153d539905f",
"rev": "1bba8a624b3b9d4f68db94fb63aaeb46039ce9e6",
"type": "github"
},
"original": {
@ -772,11 +787,11 @@
]
},
"locked": {
"lastModified": 1716210724,
"narHash": "sha256-iqQa3omRcHGpWb1ds75jS9ruA5R39FTmAkeR3J+ve1w=",
"lastModified": 1720055043,
"narHash": "sha256-SKizewU4UeYrkZWPUjur8EoxscGoNb0pGcrNL4YzAIg=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "d14b286322c7f4f897ca4b1726ce38cb68596c94",
"rev": "168b220231a70e47cc1f0919048fa5914415fb18",
"type": "github"
},
"original": {
@ -787,11 +802,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1717574423,
"narHash": "sha256-cz3P5MZffAHwL2IQaNzsqUBsJS+u0J/AAwArHMAcCa0=",
"lastModified": 1719895800,
"narHash": "sha256-xNbjISJTFailxass4LmdWeV4jNhAlmJPwj46a/GxE6M=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "d6c6cf6f5fead4057d8fb2d5f30aa8ac1727f177",
"rev": "6e253f12b1009053eff5344be5e835f604bb64cd",
"type": "github"
},
"original": {
@ -816,6 +831,21 @@
"type": "github"
}
},
"nixpkgs-24_05": {
"locked": {
"lastModified": 1717144377,
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.05",
"type": "indirect"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1711460390,
@ -882,11 +912,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1717602782,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"lastModified": 1720031269,
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
"type": "github"
},
"original": {
@ -897,11 +927,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1717196966,
"narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=",
"lastModified": 1719848872,
"narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "57610d2f8f0937f39dbd72251e9614b1561942d8",
"rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"type": "github"
},
"original": {
@ -939,11 +969,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1717681257,
"narHash": "sha256-0PhFvfc4wDjba1cus2ALsfn0wVizeKkcuF+aqvDJivg=",
"lastModified": 1720298683,
"narHash": "sha256-CNtfHBwlKuTTanwmUI85Z/HkHShnqZs+WYyxQR8zRFY=",
"owner": "pta2002",
"repo": "nixvim",
"rev": "36f2e51b28ee3389a67ed5e9ed5c4bd388b06918",
"rev": "6674dea8403747827431d4d8497c34023f93d047",
"type": "github"
},
"original": {
@ -954,11 +984,11 @@
},
"nur": {
"locked": {
"lastModified": 1717748219,
"narHash": "sha256-FTHNyCkHGI4F20WzBvIVurkr5J4UGMyZuZCWK6bxDhw=",
"lastModified": 1720333675,
"narHash": "sha256-VGywVhDGWxNjykMEiCv1XXk1xT7vYAYHe557L9dIQN0=",
"owner": "nix-community",
"repo": "NUR",
"rev": "c1edc05252cacfe23a04c9b7e687bb1dfaac67f9",
"rev": "25e98a0c8af990fdef4cd1aa951c6a7b93618bdd",
"type": "github"
},
"original": {
@ -973,10 +1003,6 @@
"lanzaboote",
"flake-compat"
],
"flake-utils": [
"lanzaboote",
"flake-utils"
],
"gitignore": "gitignore",
"nixpkgs": [
"lanzaboote",
@ -985,11 +1011,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1710923068,
"narHash": "sha256-6hOpUiuxuwpXXc/xfJsBUJeqqgGI+JMJuLo45aG3cKc=",
"lastModified": 1717664902,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "e611897ddfdde3ed3eaac4758635d7177ff78673",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
"type": "github"
},
"original": {
@ -1001,6 +1027,7 @@
"root": {
"inputs": {
"attic": "attic",
"catppuccin": "catppuccin",
"colmena": "colmena",
"deploy": "deploy",
"essentials": "essentials",
@ -1032,11 +1059,11 @@
]
},
"locked": {
"lastModified": 1711246447,
"narHash": "sha256-g9TOluObcOEKewFo2fR4cn51Y/jSKhRRo4QZckHLop0=",
"lastModified": 1718504420,
"narHash": "sha256-F2HT/abCfr0CDpkvXwYCscJyD66XDTLMVfdrIMRp2ck=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "dcc802a6ec4e9cc6a1c8c393327f0c42666f22e4",
"rev": "0043c3f92304823cc2c0a4354b0feaa61dfb4cd9",
"type": "github"
},
"original": {
@ -1092,21 +1119,6 @@
"type": "github"
}
},
"systems_10": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
@ -1256,11 +1268,11 @@
]
},
"locked": {
"lastModified": 1717278143,
"narHash": "sha256-u10aDdYrpiGOLoxzY/mJ9llST9yO8Q7K/UlROoNxzDw=",
"lastModified": 1719887753,
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "3eb96ca1ae9edf792a8e0963cc92fddfa5a87706",
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c",
"type": "github"
},
"original": {
@ -1287,24 +1299,6 @@
"type": "github"
}
},
"utils_2": {
"inputs": {
"systems": "systems_6"
},
"locked": {
"lastModified": 1709126324,
"narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"vault-secrets": {
"inputs": {
"flake-compat": "flake-compat_8",

View file

@ -17,7 +17,7 @@
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
mailserver.url = "git+https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git";
mailserver.inputs.nixpkgs.follows = "nixpkgs";
nixvim.url = "github:pta2002/nixvim";
@ -42,6 +42,8 @@
attic.url = "github:zhaofengli/attic";
attic.inputs.nixpkgs.follows = "nixpkgs";
catppuccin.url = "github:catppuccin/nix";
essentials.url = "github:jdonszelmann/essentials";
essentials.inputs.nixpkgs.follows = "nixpkgs";
};
@ -58,6 +60,7 @@
gnome-autounlock-keyring,
lanzaboote,
t,
catppuccin,
...
}@inputs:
let
@ -76,6 +79,7 @@
# Channels config
channelsConfig = {
allowUnfree = true;
permittedInsecurePackages = [ "electron" ];
};
sharedOverlays = [
(import ./pkgs)
@ -88,6 +92,7 @@
modules = [
home-manager.nixosModules.home-manager
gnome-autounlock-keyring.nixosModules.default
catppuccin.nixosModules.catppuccin
./common
];
@ -98,7 +103,6 @@
# hosts
hosts = {
# TODO: Figure out why this is reversed, and how/why it sets the FQDN
"olympus.bastion" = {
modules = [
./common/generic-vm.nix

View file

@ -13,8 +13,6 @@
# OpenGL + Vulkan
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
amdvlk
rocm-opencl-icd

View file

@ -39,14 +39,6 @@ in
};
};
xdg.configFile."hypr/hyprpaper.conf".text =
let
wallpaper = "/home/vivian/cloud/Pictures/Wallpapers-Laptop/wallpaper-nix-pink.png";
in
''
'';
programs = {
wofi = {
enable = true;
@ -211,10 +203,11 @@ in
"col.border_inactive" = "rgba(232634aa)";
groupbar = {
font_size = 16;
font_size = 10;
height = 18;
"col.active" = "rgba(babbf1aa)";
"col.inactive" = "rgba(414559aa)";
text_color = "rgba(81c8beee)";
text_color = "rgba(ffffffee)";
};
};
decoration = {

View file

@ -4,7 +4,7 @@
# * Smart Phone Sensing
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ android-studio ];
environment.systemPackages = with pkgs; [ ];
programs.wireshark = {
enable = true;

View file

@ -1,10 +0,0 @@
# null
This folder contains the NixOS configuration for my laptop, with hostname `null`.
## Information
* OS: NixOS
* WM: hyprland
* Terminal: foot
* Shell: zsh
* Theme: Captuccin Pink Dark
* Launcher: wofi

View file

@ -1,266 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ pkgs, inputs, ... }:
let
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
export __NV_PRIME_RENDER_OFFLOAD=1
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export __VK_LAYER_NV_optimus=NVIDIA_only
export LIBVA_DRIVER_NAME=nvidia
export GBM_BACKEND=nvidia-drm
exec "$@"
'';
run-hyprland = pkgs.writeShellScriptBin "run-hyprland" ''
export _JAVA_AWT_WM_NONREPARENTING=1
export XCURSOR_SIZE=32
export CLUTTER_BACKEND=wayland
export XDG_SESSION_TYPE=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export MOZ_ENABLE_WAYLAND=1
export WLR_NO_HARDWARE_CURSORS=1
export WLR_BACKEND=vulkan
export QT_QPA_PLATFORM=wayland
export GDK_BACKEND=wayland
export SDL_VIDEODRIVER=wayland
exec Hyprland
'';
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./rescue-boot.nix
./networking.nix
];
home-manager = {
# home-manager
useGlobalPkgs = true;
useUserPackages = true;
users.vivian = import ./home;
extraSpecialArgs = { inherit inputs; };
};
security = {
pam.services.swaylock = { };
sudo.wheelNeedsPassword = true;
rtkit.enable = true;
# Enables logging in with my Solokey
pam.u2f = {
enable = true;
debug = false;
cue = true;
control = "sufficient";
authFile =
"/etc/u2f-mappings"; # use `pamu2fcfg` from `pkgs.pam_u2f` to generate this config
};
};
fonts = {
fonts = with pkgs; [
material-design-icons
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
dejavu_fonts
(nerdfonts.override {
fonts =
[ "DejaVuSansMono" "Ubuntu" "DroidSansMono" "NerdFontsSymbolsOnly" ];
})
];
enableDefaultFonts = false;
fontconfig = {
defaultFonts = {
monospace = [ "DejaVuSansMono Nerd Font" "Noto Color Emoji" ];
sansSerif =
[ "DejaVu Sans" "DejaVuSansMono Nerd Font" "Noto Color Emoji" ];
serif =
[ "DejaVu Serif" "DejaVuSansMono Nerd Font" "Noto Color Emoji" ];
emoji = [ "Noto Color Emoji" ];
};
};
};
# Bootloader.
# boot.initrd.systemd.enable = true; # Experimental
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.editor = false;
systemd-boot.enable = true;
# loader.systemd-boot.configurationLimit = 6;
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi";
};
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
};
services = {
gnome.gnome-keyring.enable = true;
udisks2.enable = true;
dbus.enable = true;
xserver = {
enable = false;
layout = "us";
xkbVariant = "altgr-intl";
xkbOptions = "caps:swapescape";
videoDrivers = [ "nvidia" ];
};
blueman.enable = true;
# Enable CUPS to print documents.
printing.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
fstrim.enable = true;
# don't shutdown when power button is short-pressed
logind.extraConfig = ''
HandlePowerKey=suspend
'';
udev.packages = with pkgs; [
android-udev-rules
logitech-udev-rules
wooting-udev-rules
];
};
fileSystems = {
"/".options = [ "compress=zstd" ];
"/home".options = [ "compress=zstd" ];
"/nix".options = [ "compress=zstd" "noatime" ];
};
i18n = {
# Filesystem dedup
# services.beesd.filesystems = {
# root = {
# spec = "LABEL=nixos";
# hashTableSizeMB = 256;
# verbosity = "crit";
# extraOptions = [ "--loadavg-target" "2.0" ];
# };
# };
# Select internationalisation properties.
defaultLocale = "en_GB.utf8";
extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "en_DK.UTF-8";
};
supportedLocales =
[ "en_GB.UTF-8/UTF-8" "nl_NL.UTF-8/UTF-8" "en_DK.UTF-8/UTF-8" ];
};
xdg.portal = {
enable = true;
wlr.enable = true;
};
programs = {
# Hyprland
hyprland = {
enable = true;
package = null; # Managed by home manager
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
ssh.startAgent = true;
};
environment.loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
${run-hyprland}/bin/run-hyprland
fi
'';
hardware = {
nvidia.prime = {
offload.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
opengl = {
enable = true;
extraPackages = with pkgs; [
vaapiVdpau
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
bluetooth.enable = true;
saleae-logic.enable = true;
pulseaudio.enable = false;
};
virtualisation.podman.enable = true;
# Enable sound with pipewire.
sound.enable = true;
environment.systemPackages = with pkgs; [
pciutils
nvidia-offload
run-hyprland
wireguard-tools
slurp
gdb
swaylock-effects # Has to be installed globally so that pam module works
];
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.05"; # Did you read the comment?
}

View file

@ -1,56 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot = {
initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "rtsx_pci_sdmmc" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
fsType = "btrfs";
options = [ "subvol=@" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
fsType = "btrfs";
options = [ "subvol=@/nix" ];
};
"/home" = {
device = "/dev/disk/by-uuid/d4f56e5b-2509-4e63-8324-65a35c71e90c";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
"/boot/efi" = {
device = "/dev/disk/by-uuid/D478-6F66";
fsType = "vfat";
};
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wg0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,353 +0,0 @@
{
config,
pkgs,
inputs,
texlive,
...
}:
let
tex = pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-full;
dnd-5e-latex-template = {
pkgs = [ pkgs.v.dnd-5e-latex-template ];
};
};
in
{
programs = {
home-manager.enable = true;
foot = {
enable = true;
};
nix-index.enable = true;
exa = {
enable = true;
enableAliases = true;
};
bat.enable = true;
git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "Vivian";
userEmail = "vivian@0x76.dev";
lfs.enable = true;
# delta.enable = true;
extraConfig = {
push.autoSetupRemote = true;
init.defaultBranch = "main";
};
};
mako = {
enable = true;
extraConfig = ''
[mode=do-not-disturb]
invisible=1
'';
};
tmux = {
enable = true;
shortcut = "b";
terminal = "screen-256color";
clock24 = true;
};
firefox = {
enable = true;
package = pkgs.firefox-devedition-bin;
};
vscode = {
enable = true;
package = pkgs.vscode;
userSettings = {
"ltex.language" = "en-GB";
"latex-workshop" = {
"linting.chktex.enabled" = true;
"latex.clean.subfolder.enabled" = true;
"latex.outDir" = "%TMPDIR%/%RELATIVE_DOC%";
};
"workbench.colorTheme" = "Catppuccin Frappé";
"editor.fontFamily" = "'DejaVuSansMono Nerd Font', 'monospace', monospace";
"keyboard.dispatch" = "keyCode";
"rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer";
"terminal.integrated.defaultProfile.linux" = "zsh";
"nix.enableLanguageServer" = true; # Enable LSP.
"nix.serverPath" = "${pkgs.nil}/bin/nil"; # The path to the LSP server executable.
"[nix]" = {
"editor.defaultFormatter" = "brettm12345.nixfmt-vscode";
};
"latex-workshop.latex.tools" = [
{
"name" = "latexmk";
"command" = "latexmk";
"args" = [
"-shell-escape"
"-synctex=1"
"-interaction=nonstopmode"
"-file-line-error"
"-pdf"
"-outdir=%OUTDIR%"
"%DOC%"
];
"env" = { };
}
{
"name" = "lualatexmk";
"command" = "latexmk";
"args" = [
"-synctex=1"
"-interaction=nonstopmode"
"-file-line-error"
"-lualatex"
"-outdir=%OUTDIR%"
"%DOC%"
];
"env" = { };
}
{
"name" = "xelatexmk";
"command" = "latexmk";
"args" = [
"-synctex=1"
"-interaction=nonstopmode"
"-file-line-error"
"-xelatex"
"-outdir=%OUTDIR%"
"%DOC%"
];
"env" = { };
}
{
"name" = "latexmk_rconly";
"command" = "latexmk";
"args" = [ "%DOC%" ];
"env" = { };
}
{
"name" = "pdflatex";
"command" = "pdflatex";
"args" = [
"-synctex=1"
"-interaction=nonstopmode"
"-file-line-error"
"%DOC%"
];
"env" = { };
}
{
"name" = "bibtex";
"command" = "bibtex";
"args" = [ "%DOCFILE%" ];
"env" = { };
}
{
"name" = "rnw2tex";
"command" = "Rscript";
"args" = [
"-e"
"knitr==opts_knit$set(concordance = TRUE); knitr==knit('%DOCFILE_EXT%')"
];
"env" = { };
}
{
"name" = "jnw2tex";
"command" = "julia";
"args" = [
"-e"
"using Weave; weave(\"%DOC_EXT%\"; doctype=\"tex\")"
];
"env" = { };
}
{
"name" = "jnw2texminted";
"command" = "julia";
"args" = [
"-e"
"using Weave; weave(\"%DOC_EXT%\"; doctype=\"texminted\")"
];
"env" = { };
}
{
"name" = "pnw2tex";
"command" = "pweave";
"args" = [
"-f"
"tex"
"%DOC_EXT%"
];
"env" = { };
}
{
"name" = "pnw2texminted";
"command" = "pweave";
"args" = [
"-f"
"texminted"
"%DOC_EXT%"
];
"env" = { };
}
{
"name" = "tectonic";
"command" = "tectonic";
"args" = [
"--synctex"
"--keep-logs"
"%DOC%.tex"
];
"env" = { };
}
];
};
extensions =
with pkgs.vscode-extensions;
with pkgs.v.vscode-extensions;
[
# astro-build.astro-vscode
brettm12345.nixfmt-vscode
catppuccin.catppuccin-vsc
codezombiech.gitignore
editorconfig.editorconfig
foxundermoon.shell-format
james-yu.latex-workshop
jnoortheen.nix-ide
matklad.rust-analyzer
mkhl.direnv
ms-vscode-remote.remote-ssh
ms-vscode.cpptools
platformio.platformio-ide
redhat.vscode-yaml
tamasfe.even-better-toml
valentjn.vscode-ltex
vscodevim.vim
xaver.clang-format
];
};
direnv = {
enable = true;
nix-direnv = {
enable = true;
};
};
zsh = {
enable = true;
sessionVariables = {
DIRENV_LOG_FORMAT = "";
};
};
};
home = {
username = "vivian";
homeDirectory = "/home/vivian";
stateVersion = "22.05";
packages = with pkgs; [
appimage-run
brightnessctl
btop
calibre
cinny-desktop
discord-canary
fluxcd
fusee-launcher
gcc
gimp
gnome.eog
gnome.file-roller
gnome.gnome-font-viewer
gnome.nautilus
grim # Screenshot tool
# inputs.comma.packages.${pkgs.system}.default
inputs.webcord.packages.${pkgs.system}.default
k9s
kubectl
libnotify
mullvad-vpn
neofetch
nixpkgs-review
nixfmt
ouch
plex-media-player
plexamp
python3
retroarchFull
ripgrep
rsync
rustup
saleae-logic-2
solo2-cli
steam-run
tex
thunderbird-wayland
v.deemix-gui
wf-recorder # Screenrecorder
wl-clipboard # Clipboard manager
wofi # Wayland rofi
wpa_supplicant_gui
];
};
imports = [
./hyprland.nix
./neovim.nix
./eww
./theme.nix
];
xdg.mimeApps = {
enable = true;
defaultApplications =
let
browser = [ "firefox.desktop" ];
in
{
"image/*" = "org.gnome.eog.desktop";
"text/html" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/ftp" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/unknown" = browser;
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/xhtml+xml" = browser;
"application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser;
"application/json" = browser;
"application/pdf" = browser;
"x-scheme-handler/vscode" = "code-url-handler.desktop";
"x-scheme-handler/discord" = "webcord.desktop";
};
};
xdg.userDirs =
let
home = config.home.homeDirectory;
in
{
enable = true;
createDirectories = true;
desktop = "${home}/.desktop";
documents = "${home}/cloud/Documents";
download = "${home}/dl";
music = "${home}/cloud/Music";
pictures = "${home}/cloud/Pictures";
publicShare = "${home}/.publicShare";
templates = "${home}/.templates";
videos = "${home}/cloud/Videos";
};
services.syncthing.enable = true;
}

View file

@ -1,42 +0,0 @@
{ pkgs, ... }: {
home = {
packages = with pkgs; [
eww-wayland
pamixer
lua
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
];
file = {
".config/eww/eww.yuck".source = ./eww.yuck;
".config/eww/eww.scss".text = builtins.readFile ./eww.scss;
# scripts
# TODO: just link all scripts in ./scripts to .config/eww/scripts
".config/eww/scripts/volume.sh" = {
source = ./scripts/volume.sh;
executable = true;
};
".config/eww/scripts/wifi.sh" = {
source = ./scripts/wifi.sh;
executable = true;
};
".config/eww/scripts/workspaces.sh" = {
source = ./scripts/workspaces.sh;
executable = true;
};
".config/eww/scripts/workspaces.lua" = {
source = ./scripts/workspaces.lua;
executable = true;
};
".config/eww/scripts/do-not-disturb.sh" = {
source = ./scripts/do-not-disturb.sh;
executable = true;
};
};
};
}

View file

@ -1,138 +0,0 @@
$light-gray: #9699b7;
* {
all: unset; //Unsets everything so you can style everything from scratch
font-family: "JetBrainsMono"
}
tooltip {
background-color: $base;
border-radius: 5px
}
button {
transition: background-color 200ms, color 200ms;
}
.active {
color: $pink;
font-size: 1.4rem;
}
.inactive {
color: $base;
font-size: 1.4rem;
}
.inactive:hover {
color: $light-gray;
}
.bar {
background-color: $mantle;
}
.clock {
font-weight: bold;
background-color: $base;
color: $text;
border-radius: 10px;
padding: 0.2rem;
margin: 0.5rem;
}
.date {
font-size: 1.5rem;
color: $text;
}
.battery {
font-family: monospace;
font-size: 1.5rem;
color: $teal;
}
.volume,
.dnd,
.wifi {
font-family: monospace;
font-size: 1.5rem;
color: $mauve;
padding: 0 5px;
}
// battery menu
.batterywindow {
background-color: $mantle;
border-radius: 5px;
font-size: 18px;
font-weight: normal;
color: $text;
progressbar {
border-radius: 5px;
}
progressbar progress {
background-color: $green;
}
progressbar trough {
background-color: $base;
}
.batterymenu {
padding: 10px;
}
}
// Calendar
.cal {
background-color: $mantle;
border-radius: 5px;
font-size: 18px;
font-weight: normal;
.cal-in {
padding: 0px 10px 0px 10px;
color: $text;
.cal {
&.highlight {
padding: 20px;
}
padding: 5px 5px 5px 5px;
margin-left: 10px;
}
}
}
calender {
color: $text;
}
calendar:selected {
color: $mauve;
}
calendar.header {
color: $overlay0;
font-weight: bold;
}
calendar.button {
color: $base;
}
calendar.highlight {
color: $overlay0;
font-weight: bold;
}
calendar:indeterminate {
color: $text;
}

View file

@ -1,164 +0,0 @@
(defwidget bar []
(centerbox
:orientation "v"
(box
:valign "start"
:hexpand false
:vexpand false
:orientation "v"
:space-evenly false
)
(workspaces
:halign "center"
:vexpand true
:hexpand false
:orientation "v"
)
(box :valign "end" :hexpand false :vexpand true :orientation "v" :space-evenly false
(wifi)
(do-not-disturb)
(volume)
(battery)
(time)
)
)
)
;; ━━━ BATTERY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
(defwidget battery []
(eventbox :onclick "eww open batterywindow --toggle"
(label
:text `${
EWW_BATTERY.BAT0.status == "Charging" ? "" :
EWW_BATTERY.BAT0.capacity < 10 ? "" :
EWW_BATTERY.BAT0.capacity < 20 ? "" :
EWW_BATTERY.BAT0.capacity < 30 ? "" :
EWW_BATTERY.BAT0.capacity < 40 ? "" :
EWW_BATTERY.BAT0.capacity < 50 ? "" :
EWW_BATTERY.BAT0.capacity < 60 ? "" :
EWW_BATTERY.BAT0.capacity < 70 ? "" :
EWW_BATTERY.BAT0.capacity < 80 ? "" :
EWW_BATTERY.BAT0.capacity < 90 ? "" : ""
}`
:class "battery"
))
)
(defwidget batterymenu []
(box :orientation "v"
:class "batterymenu"
(label :text "${EWW_BATTERY.BAT0.status}: ${EWW_BATTERY.BAT0.capacity}%")
(progress :value "${EWW_BATTERY.BAT0.capacity}" :orientation "h") ; TODO: change class (and color) on low juice
)
)
(defwindow batterywindow
:monitor 0
:geometry (geometry
:x "53px"
:y "30px"
:anchor "bottom left"
)
(batterymenu)
)
; ━━━ do-not-disturb ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
(defvar dnd "")
(defwidget do-not-disturb []
(eventbox
:orientation "h"
:halign "center"
:space-evenly false
:onclick "nohup ./scripts/do-not-disturb.sh &"
(label
:text {dnd}
:class "dnd"
)
)
)
;; ━━━ WIFI ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
(defpoll wifi :interval "30s" "./scripts/wifi.sh")
(defwidget wifi []
(box
:orientation "h"
:halign "center"
:space-evenly false
(label
:text {wifi.icon}
:tooltip {wifi.status}
:class "wifi"
)
)
)
;; ━━━ VOLUME ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
(defpoll volume :interval "1s" "./scripts/volume.sh")
(defwidget volume []
(eventbox
:orientation "h"
:halign "center"
:space-evenly false
:onclick "pamixer -t"
(label
:text {volume.icon}
:tooltip "${volume.percent}%"
:class "volume"
)
)
)
;; ━━━ TIME ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
(defpoll hour :interval "10s" "date +%H")
(defpoll minute :interval "10s" "date +%M")
(defpoll dateVar :interval "600s" "date '+%A %d.%m.%y'")
(defwidget time []
(eventbox
:cursor "hand"
:hexpand false
:vexpand false
:tooltip "${dateVar}"
:onclick "eww open calendar --toggle &"
(box :orientation "v" :hexpand false :vexpand false :space-evenly false :class "clock"
(label :class "date" :text "${hour}")
(label :class "date" :text "${minute}")
)
)
)
;; Calendar
(defpoll calendar_day :interval "20h" "date '+%d'")
(defpoll calendar_year :interval "20h" "date '+%Y'")
(defwidget cal []
(box :class "cal" :orientation "v"
(box :class "cal-in"
(calendar :class "cal"
:day calendar_day
:year calendar_year))))
(defwindow calendar
:monitor 0
:geometry (geometry :x "53px"
:y "5px"
:anchor "bottom left"
:width "270px"
:height "60px")
(cal))
(deflisten workspaces_listen "./scripts/workspaces.sh")
(defwidget workspaces []
(literal :content workspaces_listen))
(defwindow bar
:monitor 0
:exclusive false
:geometry (geometry :height "1080px" :x "-4px" :y "0px"
:width "52px"
:anchor "top left")
:stacking "fg"
(bar))

View file

@ -1,10 +0,0 @@
#!/usr/bin/env nix-shell
#! nix-shell -p jq -i bash
if makoctl mode | rg -q "do-not-disturb"; then
eww update dnd=""
makoctl mode -r do-not-disturb > /dev/null
else
eww update dnd=""
makoctl mode -a do-not-disturb > /dev/null
fi

View file

@ -1,15 +0,0 @@
#!/bin/sh
per="$(pamixer --get-volume)"
if pamixer --get-mute | rg -q true; then
icon="婢"
elif [ "$per" -gt 66 ]; then
icon="墳" # high
elif [ "$per" -gt 33 ]; then
icon="奔" # med
else
icon="奄" #low
fi
printf "{\"icon\": \"${icon}\", \"percent\": \"${per}\"}"

View file

@ -1,11 +0,0 @@
#!/bin/sh
if wpa_cli status | rg -q "wpa_state=COMPLETED"; then
icon="直"
status="Connected"
else
icon="睊"
status="offline"
fi
printf "{\"icon\": \"${icon}\", \"status\": \"${status}\"}"

View file

@ -1,21 +0,0 @@
#!/usr/bin/env lua
aw = io.popen("hyprctl monitors | grep active | sed 's/()/(1)/g' | sort | awk 'NR>1{print $1}' RS='(' FS=')'")
active_workspace = aw:read("*a")
aw:close()
box = "(box :orientation \"v\" :spacing 1 :space-evenly \"true\" "
for i = 1,10 do
if i == tonumber(active_workspace) then
local btn = "(button :class \"active\" :onclick \"hyprctl dispatch workspace "..i.." \" \"\")"
box = box .. btn
else
local btn = "(button :class \"inactive\" :onclick \"hyprctl dispatch workspace "..i.."\" \"\")"
box = box .. btn
end
end
box = box .. ")"
print(box)

View file

@ -1,10 +0,0 @@
#!/bin/sh
workspaces() {
./scripts/workspaces.lua
}
workspaces
tail -f /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | grep --line-buffered "Changed to workspace" | while read -r; do
workspaces
done

View file

@ -1,137 +0,0 @@
{ pkgs, config, ... }: {
home.file.".config/hypr/hyprpaper.conf".text = ''
ipc = off
preload = ~/cloud/Pictures/Wallpapers-Laptop/wallpaper-nix-pink.png
wallpaper = eDP-1,~/cloud/Pictures/Wallpapers-Laptop/wallpaper-nix-pink.png
'';
wayland.windowManager.hyprland =
let
startup-script = pkgs.writeScriptBin "startup" ''
#!${pkgs.stdenv.shell}
hyprctl setcursor Catppuccin-Frappe-Pink-Cursors ${
builtins.toString config.home.pointerCursor.size
}
${pkgs.hyprpaper}/bin/hyprpaper &
foot --server &
eww daemon &
eww open bar &
firefox-devedition &
webcord &
element-desktop &
'';
in
{
enable = true;
recommendedEnvironment = true;
extraConfig = ''
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
monitor=eDP-1,1920x1080@60,0x0,1
monitor=eDP-1,addreserved,0,0,48,0
monitor=,preferred,auto,1
windowrulev2 = workspace 1 silent,class:^(Electron)$,title:^(.*)(WebCord)(.*)$
windowrulev2 = workspace 1 silent,title:^(Element)(.*)$
windowrulev2 = workspace 2 silent,class:^(firefox-aurora)$
windowrulev2 = float,class:^(firefox-aurora)$,title:^(Picture-in-Picture)$
general {
layout = dwindle
col.active_border = 0xfff4b8e4
}
input {
kb_options=caps:escape
touchpad {
natural_scroll= true
}
}
gestures {
workspace_swipe = true
}
misc {
no_vfr = false
disable_hyprland_logo = true
disable_splash_rendering = true
}
dwindle {
pseudotile=true
}
bind=SUPER,RETURN,exec,footclient
bind=SUPER,f,exec,firefox-devedition
bind=SUPER,d,exec,wofi --show run,drun
bind=,Print,exec,grim -g "$(slurp)" -t png - | wl-copy -t image/png
bind=SUPER,W,killactive,
bind=SUPERSHIFT,Q,exit,
bind=SUPER,S,togglefloating,
bind=SUPER,P,pin,
bindm=SUPER,mouse:272,movewindow
bindm=SUPER,mouse:273,resizewindow
bind=SUPER,left,movefocus,l
bind=SUPER,right,movefocus,r
bind=SUPER,up,movefocus,u
bind=SUPER,down,movefocus,d
bind=SUPER,1,workspace,1
bind=SUPER,2,workspace,2
bind=SUPER,3,workspace,3
bind=SUPER,4,workspace,4
bind=SUPER,5,workspace,5
bind=SUPER,6,workspace,6
bind=SUPER,7,workspace,7
bind=SUPER,8,workspace,8
bind=SUPER,9,workspace,9
bind=SUPER,0,workspace,10
bind=SUPER,grave,togglespecialworkspace
bind=ALT,1,movetoworkspace,1
bind=ALT,2,movetoworkspace,2
bind=ALT,3,movetoworkspace,3
bind=ALT,4,movetoworkspace,4
bind=ALT,5,movetoworkspace,5
bind=ALT,6,movetoworkspace,6
bind=ALT,7,movetoworkspace,7
bind=ALT,8,movetoworkspace,8
bind=ALT,9,movetoworkspace,9
bind=ALT,0,movetoworkspace,10
bind=ALT,grave,movetoworkspace,special
bind=SUPERSHIFT,1,movetoworkspacesilent,1
bind=SUPERSHIFT,2,movetoworkspacesilent,2
bind=SUPERSHIFT,3,movetoworkspacesilent,3
bind=SUPERSHIFT,4,movetoworkspacesilent,4
bind=SUPERSHIFT,5,movetoworkspacesilent,5
bind=SUPERSHIFT,6,movetoworkspacesilent,6
bind=SUPERSHIFT,7,movetoworkspacesilent,7
bind=SUPERSHIFT,8,movetoworkspacesilent,8
bind=SUPERSHIFT,9,movetoworkspacesilent,9
bind=SUPERSHIFT,0,movetoworkspacesilent,10
bind=SUPERSHIFT,grave,movetoworkspacesilent,special
bind=SUPER,mouse_down,workspace,e+1
bind=SUPER,mouse_up,workspace,e-1
bind=SUPER,g,togglegroup
bind=SUPER,tab,changegroupactive
bind=SUPER,m,fullscreen,1
bind=SUPERSHIFT,m,fullscreen,0
bind=,XF86MonBrightnessUp,exec,brightnessctl -q s +5%
bind=,XF86MonBrightnessDown,exec,brightnessctl -q s 5%-
bind=,XF86MonRaiseVolume,exec,pamixer -i 5
bind=,XF86MonLowerVolume,exec,pamixer -d 5
bind=,XF86AudioMute,exec,pamixer -t
exec-once=${startup-script}/bin/startup
'';
};
}

View file

@ -1,39 +0,0 @@
{ inputs, pkgs, ... }: {
imports = [ inputs.nixvim.homeManagerModules.nixvim ];
programs.nixvim = {
enable = true;
package = pkgs.neovim-unwrapped;
extraPlugins = with pkgs.vimPlugins; [ catppuccin-nvim ];
colorscheme = "catppuccin-frappe";
plugins = {
nix.enable = true;
treesitter = {
enable = true;
nixGrammars = false;
ensureInstalled = [ ];
};
surround.enable = true;
fugitive.enable = true;
lualine = {
enable = true;
theme = "catppuccin";
};
telescope = {
enable = true;
extensions.fzf-native.enable = true;
};
lsp = {
enable = true;
servers = {
rust-analyzer.enable = true;
rnix-lsp.enable = true;
pyright.enable = true;
};
};
nvim-cmp = { enable = true; };
};
};
}

View file

@ -1,127 +0,0 @@
{ lib, pkgs, config, ... }:
let
inherit (builtins) mapAttrs;
theme = "Catppuccin-Pink-Dark";
cursorTheme = config.home.pointerCursor.name;
colour = {
rosewater = "f2d5cf";
flamingo = "eebebe";
pink = "f4b8e4";
mauve = "ca9ee6";
red = "e78284";
maroon = "ea999c";
peach = "ef9f76";
yellow = "e5c890";
green = "a6d189";
teal = "81c8be";
sky = "99d1db";
sapphire = "85c1dc";
blue = "8caaee";
lavender = "babbf1";
text = "c6d0f5";
subtext0 = "a5adce";
subtext1 = "b5bfe2";
overlay2 = "949cbb";
overlay0 = "737994";
overlay1 = "838ba7";
surface0 = "414559";
surface1 = "51576d";
surface2 = "626880";
base = "303446";
mantle = "292c3c";
crust = "232634";
hex = mapAttrs (_name: value: "#${value}") colour;
};
in
{
home = {
file.".xsettingsd".text = ''
Net/ThemeName "${theme}"
Gtk/CursorThemeName "${cursorTheme}"
'';
pointerCursor = {
name = "Catppuccin-Frappe-Pink-Cursors";
size = 32;
package = pkgs.catppuccin-cursors.frappePink;
};
file.".config/eww/eww.scss".text = lib.mkBefore ''
$rosewater: ${colour.hex.rosewater};
$flamingo: ${colour.hex.flamingo};
$pink: ${colour.hex.pink};
$mauve: ${colour.hex.mauve};
$red: ${colour.hex.red};
$maroon: ${colour.hex.maroon};
$peach: ${colour.hex.peach};
$yellow: ${colour.hex.yellow};
$green: ${colour.hex.green};
$teal: ${colour.hex.teal};
$sky: ${colour.hex.sky};
$sapphire: ${colour.hex.sapphire};
$blue: ${colour.hex.blue};
$lavender: ${colour.hex.lavender};
$text: ${colour.hex.text};
$subtext0: ${colour.hex.subtext0};
$subtext1: ${colour.hex.subtext1};
$overlay0: ${colour.hex.overlay0};
$overlay1: ${colour.hex.overlay1};
$overlay2: ${colour.hex.overlay2};
$surface0: ${colour.hex.surface0};
$surface1: ${colour.hex.surface1};
$surface2: ${colour.hex.surface2};
$base: ${colour.hex.base};
$mantle: ${colour.hex.mantle};
$crust: ${colour.hex.crust};
'';
};
gtk = {
enable = true;
theme = {
name = theme;
package = pkgs.catppuccin-gtk;
};
iconTheme = {
name = "Arc";
package = pkgs.arc-icon-theme;
};
cursorTheme = {
name = cursorTheme;
inherit (config.home.pointerCursor) size package;
};
};
# Note, pink and blue are switched
programs.foot.settings.colors = {
alpha = 0.8;
foreground = colour.text; # Text
background = colour.base; # Base
regular0 = colour.surface1; # Surface 1
regular1 = colour.red; # red
regular2 = colour.green; # green
regular3 = colour.yellow; # yellow
regular4 = colour.pink; # pink
regular5 = colour.blue; # blue
regular6 = colour.teal; # teal
regular7 = colour.subtext1; # Subtext 1
bright0 = colour.surface2; # Surface 2
bright1 = colour.red; # red
bright2 = colour.green; # green
bright3 = colour.yellow; # yellow
bright4 = colour.pink; # pink
bright5 = colour.blue; # blue
bright6 = colour.teal; # teal
bright7 = colour.subtext0; # Subtext 0
};
programs.mako = {
backgroundColor = colour.hex.mantle;
borderColor = colour.hex.pink;
textColor = colour.hex.text;
borderRadius = 5;
};
}

View file

@ -1,76 +0,0 @@
_: {
services.v.dns = {
enable = true;
openFirewall = false;
mode = "laptop";
};
services.mullvad-vpn.enable = true;
networking = {
useDHCP = true;
dhcpcd.wait = "background";
wireless = {
enable = true;
environmentFile = "/var/lib/secrets/wireless.env";
userControlled.enable = true;
networks = {
eduroam = {
auth = ''
proto=RSN
key_mgmt=WPA-EAP
eap=PEAP
identity="vroest@tudelft.nl"
password=hash:@EDUROAM_PASSWORD_HASH@
domain_suffix_match="radius.tudelft.nl"
anonymous_identity="anonymous@tudelft.nl"
phase1="peaplabel=0"
phase2="auth=MSCHAPV2"
ca_cert="/etc/ssl/certs/ca-bundle.crt"
'';
};
"Pikachu 5G" = { psk = "@PIKACHU_PASSWORD@"; };
"sha256('yeet')" = { psk = "@SHA256_PASSWORD@"; };
"wired" = { psk = "@WIRED_PASSWORD@"; };
"meowy hotspot" = { psk = "@HOTSPOT_PASSWORD@"; };
"WiFi Roest" = { psk = "@WIFI_ROEST_PASSWORD@"; };
};
};
nameservers = [
"127.0.0.1" # Use locally deployed unbound
"::1"
];
firewall.allowedUDPPorts = [ 51820 ];
# Maybe switch to wg-quick
wireguard.interfaces.wg0 = {
ips = [ "10.100.0.4/24" ];
listenPort = 51820;
privateKeyFile = "/var/lib/secrets/wg_key";
peers = [
{
# Delft
publicKey = "kDIO3BJSYlDwRXc2zt9tR1LqKJzIPrulaRmdiYkg+m0=";
allowedIPs = [ "10.100.0.1" "10.42.42.0/23" ];
endpoint = "195.85.167.34:51820";
persistentKeepalive = 25;
}
{
# Aerdenhout
publicKey = "KgqLhmUMX6kyTjRoa/GOCrZOvXNE5HWYuOr/T3v8/VI=";
allowedIPs = [
"10.100.0.5"
"192.168.0.0/24" # to avoid being less specific than a LAN
"192.168.1.0/24"
"10.10.10.0/24"
];
endpoint = "80.60.83.220:51820";
persistentKeepalive = 25;
}
];
};
};
}

View file

@ -1,35 +0,0 @@
{ pkgs, ... }:
let
# TODO: slim down size
netboot = import (pkgs.path + "/nixos/lib/eval-config.nix") {
inherit (pkgs) system;
modules = [
(pkgs.path + "/nixos/modules/installer/netboot/netboot-minimal.nix")
module
];
};
module = {
system.stateVersion = "22.11";
boot.supportedFilesystems = [ "btrfs" "ext4" ];
environment.systemPackages = with pkgs; [ git ];
};
in
{
boot.loader.systemd-boot = {
extraEntries = {
"rescue.conf" = ''
title Rescue Boot
linux /rescue-kernel
initrd /rescue-initrd
options init=${netboot.config.system.build.toplevel}/init ${
toString netboot.config.boot.kernelParams
}
'';
};
extraFiles = {
"rescue-kernel" = "${netboot.config.system.build.kernel}/bzImage";
"rescue-initrd" = "${netboot.config.system.build.netbootRamdisk}/initrd";
};
};
}