Compare commits

..
74 changed files with 4089 additions and 699 deletions

View file

@ -12,10 +12,29 @@
with lib;
with builtins; {
imports = [lix-module.nixosModules.default];
nix = {
extraOptions = ''
experimental-features = nix-command flakes
keep-outputs = true
keep-derivations = true
'';
};
nixpkgs = {
config = {
allowUnfree = true;
permittedInsecurePackages = [
"electron-27.3.11"
"nodejs-16.20.0"
];
};
overlays = [rs-programs niri.overlays.niri];
};
environment = {
systemPackages = with pkgs; [
overskride
pulsemixer
htmlq
@ -69,14 +88,18 @@ with builtins; {
];
};
hardware.graphics.enable = true;
networking = {
networkmanager = {
enable = true;
};
};
services = {
systemd-lock-handler.enable = true;
openssh = {
enable = true;
settings.PasswordAuthentication = false;
settings.KbdInteractiveAuthentication = false;
# settings.PasswordAuthentication = false;
# settings.KbdInteractiveAuthentication = false;
};
};
@ -93,11 +116,31 @@ with builtins; {
hardware.gpgSmartcards.enable = true;
time.timeZone = "Europe/Berlin";
home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
home.sessionVariables.TZ = nixosConfig.time.timeZone;
};
nixpkgs.config.packageOverrides = pkgs: {
sudo = pkgs.sudo.override {withInsults = true;};
};
security.sudo.extraConfig = "Defaults insults";
boot.kernel.sysctl."vm.max_map_count" = 2147483642;
hardware = {
uinput.enable = true;
bluetooth.enable = true;
# keyboard.uhk.enable = true;
};
services.avahi = {
enable = true;
};
security.rtkit.enable = true;
@ -111,4 +154,12 @@ with builtins; {
enable = true;
algorithm = "zstd";
};
users.defaultUserShell = pkgs.nushell;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 60d";
};
}

471
flake.lock generated
View file

@ -1,72 +1,5 @@
{
"nodes": {
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1732200724,
"narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "153d52373b0fb2d343592871009a286ec8837aec",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1736852337,
"narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1742394900,
@ -140,60 +73,7 @@
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1741628778,
"narHash": "sha256-RsvHGNTmO2e/eVfgYK7g+eYEdwwh7SbZa+gZkT24MEA=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "5a81d390bb64afd4e81221749ec4bffcbeb5fa80",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"stylix",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
@ -229,27 +109,6 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": [
"stylix",
"systems"
]
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
@ -265,87 +124,6 @@
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"stylix",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1741379162,
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"stylix",
"git-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"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1732369855,
"narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "dadd58f630eeea41d645ee225a63f719390829dc",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "47.2",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -366,27 +144,6 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1741635347,
"narHash": "sha256-2aYfV44h18alHXopyfL4D9GsnpE5XlSVkp4MGe586VU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7fb8678716c158642ac42f9ff7a18c0800fea551",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"lix": {
"flake": false,
"locked": {
@ -424,6 +181,19 @@
"url": "https://git.lix.systems/lix-project/nixos-module"
}
},
"mac-brcm-fw": {
"flake": false,
"locked": {
"lastModified": 1727366922,
"narHash": "sha256-+kW8ogc6DykjMVlrr+3vWKs9ZUdJ9EW72LbY7k/Qvh4=",
"path": "/home/jade/nix-configs/mac-brcm-fw",
"type": "path"
},
"original": {
"path": "/home/jade/nix-configs/mac-brcm-fw",
"type": "path"
}
},
"niri": {
"inputs": {
"niri-stable": "niri-stable",
@ -482,16 +252,18 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1742806253,
"narHash": "sha256-zvQ4GsCJT6MTOzPKLmlFyM+lxo0JGQ0cSFaZSACmWfY=",
"owner": "NixOS",
"lastModified": 1687903496,
"narHash": "sha256-4PPwbFM4dNqso3zBya5rgfRvnBoIbN2J7qZ2ZpRyOUc=",
"owner": "networkException",
"repo": "nixos-hardware",
"rev": "ecaa2d911e77c265c2a5bac8b583c40b0f151726",
"rev": "8e28b9ee431b265d1fc74b8b819ea0816344c4a1",
"type": "github"
},
"original": {
"id": "nixos-hardware",
"type": "indirect"
"owner": "networkException",
"ref": "apple-t2-init",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
@ -584,22 +356,6 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1741513245,
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1726937504,
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
@ -615,41 +371,18 @@
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"stylix",
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1741693509,
"narHash": "sha256-emkxnsZstiJWmGACimyAYqIKz2Qz5We5h1oBVDyQjLw=",
"owner": "nix-community",
"repo": "NUR",
"rev": "5479646b2574837f1899da78bdf9a48b75a9fb27",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"crane": "crane",
"fenix": "fenix",
"home-manager": "home-manager",
"lix-module": "lix-module",
"mac-brcm-fw": "mac-brcm-fw",
"niri": "niri",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable_2",
"nixpkgs-unstable-small": "nixpkgs-unstable-small",
"stylix": "stylix",
"typst-within": "typst-within"
}
},
@ -699,41 +432,6 @@
"url": "https://static.rust-lang.org/dist/channel-rust-1.83.0.toml"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"git-hooks": "git-hooks",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_3",
"nur": "nur",
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1743075971,
"narHash": "sha256-8fSI6C19ZTcHgvoLK17wfEEVI08tgnZfSLgVe3E/22w=",
"owner": "danth",
"repo": "stylix",
"rev": "2fb8321ea16c595e0208b22021ddaf1f471c634a",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -764,133 +462,14 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1716423189,
"narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "eb39e141db14baef052893285df9f266df041ff8",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "eb39e141db14baef052893285df9f266df041ff8",
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1741468895,
"narHash": "sha256-YKM1RJbL68Yp2vESBqeZQBjTETXo8mCTTzLZyckCfZk=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "47c8c7726e98069cade5827e5fb2bfee02ce6991",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1740877430,
"narHash": "sha256-zWcCXgdC4/owfH/eEXx26y5BLzTrefjtSLFHWVD5KxU=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "d48ee86394cbe45b112ba23ab63e33656090edb4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"tinted-zed": {
"flake": false,
"locked": {
"lastModified": 1725758778,
"narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=",
"owner": "tinted-theming",
"repo": "base16-zed",
"rev": "122c9e5c0e6f27211361a04fae92df97940eccf9",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-zed",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"stylix",
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733222881,
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"typst-within": {
"inputs": {
"crane": "crane_2",
"fenix": "fenix_2",
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_4",
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_3",
"rust-manifest": "rust-manifest",
"systems": "systems_3"
"systems": "systems_2"
},
"locked": {
"lastModified": 1739736913,

View file

@ -6,9 +6,9 @@
nixpkgs-stable.url = "nixpkgs/nixos-24.11";
nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small";
niri.url = "github:sodiboo/niri-flake";
stylix.url = "github:danth/stylix";
typst-within.url = "github:schrottkatze/typst";
crane.url = "github:ipetkov/crane";
typst-within = {
url = "github:schrottkatze/typst";
};
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs.nixpkgs.follows = "nixpkgs";
@ -17,6 +17,14 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:networkException/nixos-hardware/apple-t2-init";
mac-brcm-fw = {
url = "path:/home/jade/nix-configs/mac-brcm-fw";
flake = false;
};
crane = {
url = "github:ipetkov/crane";
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
@ -32,8 +40,8 @@
typst-within,
home-manager,
nixos-hardware,
mac-brcm-fw,
niri,
stylix,
fenix,
crane,
...
@ -70,7 +78,6 @@
system = "x86_64-linux";
modules = [
inputs.niri.nixosModules.niri
stylix.nixosModules.stylix
./hosts/monosodium-glutamate-g/configuration.nix
home-manager.nixosModules.home-manager
{
@ -97,7 +104,6 @@
system = "x86_64-linux";
modules = [
inputs.niri.nixosModules.niri
stylix.nixosModules.stylix
./hosts/denkbrett/configuration.nix
home-manager.nixosModules.home-manager
{
@ -117,6 +123,34 @@
}
];
};
potatobook-g = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-unstable-small rs-programs lix-module niri;
};
system = "x86_64-linux";
modules = [
inputs.niri.nixosModules.niri
"${mac-brcm-fw}"
./hosts/potatobook-g/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit pkgs-unstable-small pkgs-stable typst-within;
};
home-manager.users.jade = {
nixosConfig,
pkgs,
...
}: {
home.sessionVariables.TZ = nixosConfig.time.timeZone;
home.stateVersion = "${nixosConfig.system.stateVersion}";
};
}
nixos-hardware.nixosModules.apple-t2
];
};
};
};
}

View file

@ -1,7 +1,12 @@
# 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, ...}: {
{
config,
pkgs,
lib,
...
}: {
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0"
"electron-27.3.11"
@ -41,6 +46,7 @@
boot.binfmt.emulatedSystems = ["aarch64-linux"];
hardware.bluetooth.enable = true;
services.blueman.enable = true;
environment.systemPackages = [

View file

@ -47,6 +47,7 @@
gnome.gnome-keyring.enable = true;
};
hardware = {
bluetooth.enable = true;
keyboard.uhk.enable = true;
enableRedistributableFirmware = true;
};

View file

@ -0,0 +1,169 @@
{pkgs, ...}: {
nix.settings = {
trusted-substituters = [
"https://t2linux.cachix.org"
];
trusted-public-keys = [
"t2linux.cachix.org-1:P733c5Gt1qTcxsm+Bae0renWnT8OLs0u9+yfaK2Bejw="
];
};
imports = [
./hardware-configuration.nix
../../common.nix
../../modules
#inputs.mms.module
];
#nixpkgs = {
#overlays = [
#(self: super: {
#linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override {
#structuredExtraConfig = with lib.kernel; {
##"FB" = yes;
##"FRAMEBUFFER_CONSOLE" = yes;
##"VGA_CONSOLE" = yes;
##"VIDEO_SELECT" = yes;
#LOGO = lib.mkForce yes;
#LOGO_LINUX_CLUT224 = yes;
#};
#ignoreConfigErrors = true;
#});
#})
#];
#};
#boot.kernelPatches = [
#{
#name = "fomx";
#patch = ../other/0001-fomx.patch;
#}
#];
boot.binfmt.emulatedSystems = ["aarch64-linux"];
jade = {
flatpak.enable = true;
desktop = {
compositing.enable = true;
syncthing.enable = true;
kdeconnect.enable = true;
cloud.enable = true;
social.enable = true;
mail.enable = true;
gaming.enable = true;
evremap.enable = true;
};
terminal.enable = true;
};
fileSystems = {
"/".options = ["compress=zstd:3"];
"/home".options = ["compress=zstd:3"];
"/nix".options = ["compress=zstd:3" "noatime"];
#"/swap".options = [ "noatime" ];
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.libinput.touchpad = {
disableWhileTyping = true;
};
networking.hostName = "potatobook-g";
services.autorandr = {
enable = true;
profiles = {
"default" = {
config = {
"eDP-1" = {
enable = true;
mode = "1920x1200";
};
};
};
};
};
# hardware.keyboard.uhk.enable = true;
hardware.enableRedistributableFirmware = true;
environment.systemPackages = with pkgs; [
android-tools
];
environment.pathsToLink = [
"/share/nix-direnv"
];
services.blueman.enable = true;
programs.adb.enable = true;
services.gnome.gnome-keyring.enable = true;
programs.seahorse.enable = true;
security.pam.services.jade.enableGnomeKeyring = true;
systemd.services."NetworkManager-wait-online".enable = false;
# services.pixiecore =
# let
# nixpkgs = builtins.getFlake "nixpkgs/nixos-unstable";
# sys = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# modules = [
# ({config, pkgs, lib, modulesPath, ...}: {
# imports = [
# (modulesPath + "/installer/netboot/netboot-base.nix")
# ];
# services.getty.autologinUser = lib.mkForce "root";
# console.keyMap = "de";
# system.stateVersion = config.system.nixos.release;
# environment.systemPackages = with pkgs; [
# helix nil git neofetch
# ];
# programs = {
# zsh = {
# enable = true;
# enableCompletion = true;
# };
# };
# })
# ];
# };
# build = sys.config.system.build;
# in {
# enable = true;
# openFirewall = true;
# kernel = "${build.kernel}/bzImage";
# initrd = "${build.netbootRamdisk}/initrd";
# cmdLine = "init=${build.toplevel}/init loglevel=4";
# };
systemd.services = {
create-swapfile = {
serviceConfig.Type = "oneshot";
wantedBy = ["swap-swapfile.swap"];
script = ''
swapfile="/swap/swapfile"
if [[ -f "$swapfile" ]]; then
echo "Swap file $swapfile already exists, taking no action"
else
echo "Setting up swap file $swapfile"
${pkgs.coreutils}/bin/truncate -s 0 "$swapfile"
${pkgs.e2fsprogs}/bin/chattr +C "$swapfile"
fi
'';
};
};
services.logind.extraConfig = ''
RuntimeDirectorySize=12G
'';
# i rly should put that important big comment back here
system.stateVersion = "22.11"; # Did you read the comment?
}

View file

@ -0,0 +1,62 @@
# 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,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "uas" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62";
fsType = "btrfs";
options = ["subvol=root"];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62";
fsType = "btrfs";
options = ["subvol=home"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/f6d243ec-6be9-4551-8cbb-aefb7b691a62";
fsType = "btrfs";
options = ["subvol=nix"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5F66-17ED";
fsType = "vfat";
};
swapDevices = [
{
device = "/swap/swapfile";
size = 1024 * 12; # 12GB
}
];
# 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.enp2s0f1u1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.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;
# high-resolution display
}

View file

@ -0,0 +1,11 @@
{
config,
pkgs,
...
}: {
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./configuration.nix
];
}

View file

@ -12,6 +12,9 @@ tbuild:
update: update-typst-configs
nix flake update --commit-lock-file --log-format multiline
build-mac:
sudo nixos-rebuild switch --flake . --impure --override-input mac-brcm-fw path:/home/jade/mac-brcm-fw --fast --log-format multiline
update-typst-configs:
#!/usr/bin/env nu
let file = './modules/desktop-environment/media/typst.nix';

3
mac-brcm-fw/default.nix Normal file
View file

@ -0,0 +1,3 @@
{...}: {}
# dummy

View file

@ -2,11 +2,10 @@
imports = [
./shell
./desktop
./desktop-legacy
./hardware
./net
./firewall.nix
./desktop-environment
./input
./media
./nix.nix
./graphics.nix
];
}

View file

@ -0,0 +1,20 @@
{pkgs, ...}: {
programs = {
noisetorch.enable = true;
};
services = {
pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
};
environment.systemPackages = with pkgs; [
pavucontrol
volumeicon
playerctl
helvum
];
}

View file

@ -0,0 +1,16 @@
{...}: {
imports = [
./audio.nix
./eduroam.nix
./home
./media
./dm.nix
./tlp.nix
./locale.nix
./printing.nix
];
services.flatpak.enable = true;
security.polkit.enable = true;
services.illum.enable = true;
services.upower.enable = true;
}

View file

@ -0,0 +1,33 @@
{
pkgs,
config,
lib,
...
}: let
cfg = config.jade.desktop.dm;
in
with lib; {
options.jade.desktop.dm.autoLogin = {
enable = mkEnableOption "Enable Autologin";
delay = mkOption {
type = types.int;
default = 0;
};
};
config.services = {
displayManager = {
autoLogin = {
enable = cfg.autoLogin.enable;
user = "jade";
};
defaultSession = "niri";
};
xserver.displayManager.gdm = {
enable = true;
banner = "Meow :3";
autoLogin = {
delay = cfg.autoLogin.delay;
};
};
};
}

View file

@ -0,0 +1,56 @@
# Thanks @ kloenk (@kloenk@catcatnya.com) for making this for me at MRMCD 2024 :33
{pkgs-stable, ...}: let
caDir = "/var/lib/easyroam";
uuid = "821ad781-76a3-447f-a2e8-c7f18a1df3bc";
in {
systemd.services.easyroam = {
requires = ["NetworkManager.service"];
after = ["NetworkManager.service"];
requiredBy = ["network-online.target"];
path = with pkgs-stable; [networkmanager openssl gnused];
script = ''
set -x
openssl pkcs12 -password pass: -in ${caDir}/my_easyroam_cert.p12 -legacy -nokeys | openssl x509 > ${caDir}/easyroam_client_cert.pem
cn=$(openssl x509 -noout -subject -in ${caDir}/easyroam_client_cert.pem -legacy | sed 's/.*CN = \(.*\), C.*/\1/')
openssl pkcs12 -legacy -password pass: -in ${caDir}/my_easyroam_cert.p12 -nodes -nocerts | openssl rsa -aes256 -passin pass: -passout pass:meow -out ${caDir}/easyroam_client_key.pem
openssl pkcs12 -password pass: -in ${caDir}/my_easyroam_cert.p12 -legacy -cacerts -nokeys > ${caDir}/easyroam_root_ca.pem
nmcli connection modify --temporary uuid ${uuid} 802-1x.identity "$cn"
'';
serviceConfig = {
Type = "oneshot";
};
};
networking.networkmanager.ensureProfiles.profiles.eduroam = {
"802-1x" = {
ca-cert = "${caDir}/easyroam_root_ca.pem";
client-cert = "${caDir}/easyroam_client_cert.pem";
domain-suffix-match = "easyroam.eduroam.de";
eap = "tls;";
identity = "meow";
private-key = "${caDir}/easyroam_client_key.pem";
private-key-password = "meow";
};
connection = {
id = "eduroam";
type = "wifi";
inherit uuid;
};
ipv4 = {
method = "auto";
};
ipv6 = {
addr-gen-mode = "default";
method = "auto";
};
proxy = {};
wifi = {
mode = "infrastructure";
ssid = "eduroam";
};
wifi-security = {
key-mgmt = "wpa-eap";
};
};
}

View file

@ -0,0 +1,355 @@
{pkgs, ...}: {
home.file = {
".tridactylrc" = {
text = ''
set editorcmd kitty hx %f +%l
set newtab about:blank
'';
};
};
programs.firefox = {
enable = true;
package = pkgs.firefox.override {
nativeMessagingHosts = [
pkgs.tridactyl-native
];
};
policies = {
DefaultDownloadDirectory = "\${home}/Downloads";
Extensions.Install = builtins.map (name: "https://addons.mozilla.org/firefox/downloads/latest/${name}") [
"ublock-origin"
"tridactyl-vim"
"privacy-badger17"
"gruvbox-dark-theme"
"torproject-snowflake"
"bitwarden-password-manager"
"terms-of-service-didnt-read"
"shinigami-eyes"
"darkreader"
"sponsorblock"
"youtube-mrbeastify"
"return-youtube-dislikes"
"multi-account-containers"
"tabby-cat-friend"
"indie-wiki-buddy"
];
Extensions.Uninstall = [
"google@search.mozilla.org"
"bing@search.mozilla.org"
"amazondotcom@search.mozilla.org"
"ebay@search.mozilla.org"
"twitter@search.mozilla.org"
];
"DisableFirefoxStudies" = true;
"DisableTelemetry" = true;
"DisableFeedbackCommands" = true;
"DisablePocket" = true;
};
profiles.jade = {
search = {
force = true;
default = "DuckDuckGo";
engines = {
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["pkgs"];
};
"Nix Options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["opts"];
};
"Home manager Options" = {
urls = [
{
template = "https://home-manager-options.extranix.com/";
params = [
{
name = "query";
value = "{searchTerms}";
}
{
name = "release";
value = "master";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["hm"];
};
"NixOS Wiki" = {
urls = [
{
template = "https://nixos.wiki/index.php";
params = [
{
name = "search";
value = "{searchTerms}";
}
];
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["nxwk"];
};
"Noogle" = {
urls = [
{
template = "https://noogle.dev/q";
params = [
{
name = "term";
value = "{searchTerms}";
}
];
}
];
definedAliases = ["ngl"];
};
"lib.rs" = {
urls = [
{
template = "https://lib.rs/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
icon = "https://lib.rs/favicon.png";
definedAliases = ["libs"];
};
"rust docs" = {
urls = [
{
template = "https://docs.rs/releases/search";
params = [
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "https://docs.rs/-/static/favicon.ico";
definedAliases = ["docs"];
};
"rust docs direct open" = {
urls = [
{
template = "https://docs.rs/{searchTerms}";
}
];
definedAliases = ["doc" "docd"];
};
"rust std docs" = {
urls = [
{
template = "https://docs.rust-lang.org/std/index.html";
params = [
{
name = "search";
value = "{searchTerms}";
}
];
}
];
icon = "https://doc.rust-lang.org/favicon.ico";
definedAliases = ["std"];
};
"MDN" = {
urls = [
{
template = "https://developer.mozilla.org/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"Amazon.de".metaData.hidden = true;
};
};
settings = {
"devtools.editor.keymap" = "vim";
"devtools.toolbox.host" = "right";
"devtools.theme" = "dark";
"webgl.disabled" = false;
"browser.urlbar.decodeURLsOnCopy" = true;
"browser.urlbar.unitConversion.enabled" = true;
"browser.urlbar.suggest.calculator" = true;
"browser.compactmode.show" = true;
"browser.uidensity" = 1;
"screenshots.browser.component.enabled" = true;
"browser.aboutConfig.showWarning" = false;
"browser.aboutwelcome.showModal" = false;
"browser.aboutwelcome.enabled" = false;
"browser.preferences.moreFromMozilla" = false;
"browser.menu.showViewImageInfo" = true;
"browser.shopping.experience2023.active" = false;
"browser.shopping.experience2023.survey.enabled" = false;
"identity.fxaccounts.enabled" = true;
"browser.tabs.firefox-view" = true;
"browser.tabs.firefox-view-next" = true;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts" = false;
"privacy.trackingprotection.emailtracking.enabled" = true;
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.socialtracking.enabled" = true;
"browser.ml.chat.enabled" = false;
"browser.ml.chat.hideLocalhost" = false;
"browser.ml.chat.prompt.prefix" = "";
"browser.ml.chat.prompts.0" = "";
"browser.ml.chat.prompts.1" = "";
"browser.ml.chat.prompts.2" = "";
"browser.ml.chat.prompts.3" = "";
"browser.ml.chat.provider" = "";
"browser.ml.chat.shortcuts" = false;
"browser.ml.chat.shortcuts.custom" = false;
"browser.ml.chat.shortcuts.longPress" = "";
"browser.ml.chat.sidebar" = false;
"geo.provider.network.logging.enabled" = true;
"extensions.getAddons.showPane" = false;
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"browser.discovery.enabled" = false;
"browser.shopping.experience2023.enabled" = false;
"datareporting.policy.dataSubmissionEnabled" = false;
"datareporting.healthreport.uploadEnabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.server" = "data:,";
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.coverage.opt-out" = true;
"toolkit.coverage.endpoint.base" = "";
"browser.ping-centre.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
"app.shield.optoutstudies.enabled" = false;
"app.normandy.enabled" = false;
"app.normandy.api_url" = "";
"dom.private-attribution.submission.enabled" = false;
"browser.newtabpage.activity-stream.feeds.showWeather" = false;
"browser.newtabpage.activity-stream.feeds.weatherfeed" = false;
"browser.safebrowsing.malware.enabled" = false;
"browser.safebrowsing.phishing.enabled" = false;
"browser.safebrowsing.downloads.enabled" = false;
"browser.safebrowsing.downloads.remote.enabled" = false;
"browser.safebrowsing.downloads.remote.url" = "";
"browser.safebrowsing.downloads.remote.block_potentially_unwanted" = false;
"browser.safebrowsing.downloads.remote.block_uncommon" = false;
"browser.safebrowsing.allowOverride" = false;
"network.prefetch-next" = false;
"network.dns.disablePrefetch" = true;
"network.dns.disablePrefetchFromHTTPS" = true;
"network.predictor.enabled" = false;
"network.predictor.enable-prefetch" = false;
"network.http.speculative-parallel-limit" = 0;
"browser.places.speculativeConnect.enabled" = false;
"browser.send_pings" = false;
"browser.urlbar.pocket.featureGate" = false;
"browser.urlbar.weather.featureGate" = false;
"browser.urlbar.speculativeConnect.enabled" = false;
"browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
"browser.search.suggest.enabled" = false;
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.trending.featureGate" = false;
"security.ssl.require_safe_negotiation" = true;
"security.remote_settings.crlite_filters.enabled" = true;
"security.pki.crlite_mode" = 2;
"dom.security.https_only_mode" = true;
"dom.security.https_only_mode_pbm" = true;
"security.ssl.treat_unsafe_negotiation_as_broken" = true;
"browser.xul.error_pages.expert_bad_cert" = true;
"network.http.referer.XOriginTrimmingPolicy" = 2;
"privacy.userContext.enabled" = true;
"privacy.userContext.ui.enabled" = true;
"privacy.userContext.newTabContainerOnLeftClick.enabled" = true;
"dom.disable_window_move_resize" = true;
"browser.uitour.enabled" = false;
"browser.uitour.url" = "";
"permissions.manager.defaultsUrl" = "";
"webchannel.allowObject.urlWhitelist" = "";
"network.IDN_show_punycode" = true;
"pdfjs.disabled" = false;
"pdfjs.enableScripting" = false;
"browser.tabs.searchclipboardfor.middleclick" = false;
"browser.download.useDownloadDir" = false;
"browser.download.alwaysOpenPanel" = false;
"browser.download.manager.addToRecentDocs" = false;
"browser.download.always_ask_before_handling_new_types" = true;
"privacy.resistFingerprinting" = true;
"privacy.resistFingerprinting.pbmode" = true;
"privacy.window.maxInnerWidth" = 1600;
"privacy.window.maxInnerHeight" = 900;
"privacy.resistFingerprinting.block_mozAddonManager" = true;
"privacy.resistFingerprinting.letterboxing" = false;
"widget.non-native-theme.enabled" = true;
"browser.link.open_newwindow" = 3;
"browser.link.open_newwindow.restriction" = 0;
"signon.rememberSignons" = false;
"dom.popup_allowed_events" = "click dblclick mousedown pointerdown";
"browser.pagethumbnails.capturing_disabled" = true;
"geo.enabled" = false;
"full-screen-api.enabled" = false;
"permissions.default.geo" = 0;
"permissions.default.camera" = 0;
"permissions.default.microphone" = 0;
"permissions.default.desktop-notification" = 0;
"permissions.default.xr" = 0;
};
};
};
}

View file

@ -0,0 +1,30 @@
{...}: {
programs.niri.enable = true;
home-manager.users.jade = {pkgs, ...}: {
imports = [
./notifications.nix
./terminal.nix
./layaway.nix
./swayidle.nix
./browser.nix
./eww
./niri
];
# temporary(tm)
programs.wofi.enable = true;
programs.swaylock.enable = true;
services.network-manager-applet.enable = true;
xsession.enable = true;
home.packages = [
pkgs.fluent-reader
];
services.gpg-agent = {
enable = true;
enableNushellIntegration = true;
enableSshSupport = true;
};
};
}

View file

@ -0,0 +1,77 @@
(include "bottomBar/workspaces.yuck")
(include "bottomBar/traveldings.yuck")
(defwindow bottomBar
:monitor 0
:stacking "fg"
:wm-ignore true
:exclusive true
:geometry (geometry
:width "100%"
:height "33px"
:anchor "bottom center")
(bottomBar))
(defwidget bottomBar []
(overlay
:class "bottomBar"
(transform
:translate-y "1.5px"
(centerbox
(box
:halign "start"
(workspaceWidget)
)
(box
:halign "center"
(traveldings)
)
(box
:halign "end"
; (label :text "${iceData.speed}km/h")
(mullvadThing)
)
)
)
(box
:class "lesbianFlag"
:height 1
( flagEl :flipped true :color "#D52D00")
( flagEl :flipped true :color "#EF7627")
( flagEl :flipped true :color "#FF9A56")
( flagEl :flipped true :color "#FFFFFF")
( flagEl :flipped true :color "#D162A4")
( flagEl :flipped true :color "#B55690")
( flagEl :flipped true :color "#A30262")
)
)
)
(deflisten mullvad
:initial "{\"state\":\"init\"}"
`mullvad status -j listen`
)
(defwidget mullvadThing []
(box
:class "container"
(button
:height 16
:width 16
:class "mullvad-state-${mullvad.state}"
)
)
)
(defwidget iceTacho []
(box
:class "iceTacho"
:tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
(label :text "${iceTachoData.speed} km/h")
)
)
(deflisten iceTachoData
:initial "null"
{ "~/.config/eww/scripts/iceTacho.nu" }
)

View file

@ -0,0 +1,37 @@
(defwidget traveldings []
(revealer
:class "traveldings"
:transition "crossfade"
:reveal { traveldings_data != "null" }
(traveldingsBarWidget)
)
)
(defwidget traveldingsBarWidget []
(overlay
(box
:width 640
(label
:halign "start"
:text "${traveldings_data.line} -> ${strlength(traveldings_data.arrival_station) > 24 ? "${substring(traveldings_data.arrival_station, 0, 24)}…" : traveldings_data.arrival_station}${traveldings_data.arrival_platform_data_available ? " (Gl. ${traveldings_data.arrival_platform_real})" : ""}"
)
(label
:halign "end"
:text { traveldings_data.time_left >= 3600 ? formattime(traveldings_data.time_left, "noch %-Hh %-Mmin", "Etc/UTC") : formattime(traveldings_data.time_left, "noch %-Mmin", "Etc/UTC") }
)
)
(box
(progress
:class { traveldings_data.live ? "traveldings_live" : "traveldings_disconnected" }
:value {traveldings_data.progress * 100}
:orientation "horizontal"
)
)
)
)
(deflisten traveldings_data
:initial "null"
"traveldings current"
)

View file

@ -0,0 +1,18 @@
(defwidget workspaceWidget []
(box
:class "workspaces"
(for workspace in workspaces
(button
:style "border-bottom: 4px solid ${workspace.color}${workspace.active ? "; background-color: #3c3836" : ""}"
:class "${workspace.focused ? "focused" : ""}"
:onclick "swaymsg workspace ${workspace.name}"
(label :text "${workspace.idx}")
)
)
)
)
(deflisten workspaces
:initial "[]"
"bar-ws-monitor"
)

Some files were not shown because too many files have changed in this diff Show more