Compare commits

...

4 Commits

Author SHA1 Message Date
Jan-Bulthuis 73c4756de6 Completed migration to flakes 2025-01-24 01:22:01 +01:00
Jan-Bulthuis 0932432e11 Moved user modules 2025-01-24 00:50:13 +01:00
Jan-Bulthuis 9352fa2649 Added flake lock 2025-01-24 00:29:06 +01:00
Jan-Bulthuis b4ad26555f Changes 2025-01-24 00:28:22 +01:00
82 changed files with 1014 additions and 83 deletions

759
flake.lock Normal file
View File

@ -0,0 +1,759 @@
{
"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": 1735953590,
"narHash": "sha256-YbQwaApLFJobn/0lbpMKcJ8N5axKlW2QIGkDS5+xoSU=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "c2a1232aa2c0ed27dcbf005779bcfe0e0ab5e85d",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"type": "github"
}
},
"devshell": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735644329,
"narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=",
"owner": "numtide",
"repo": "devshell",
"rev": "f7795ede5b02664b57035b3b757876703e2c3eac",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1736899990,
"narHash": "sha256-S79Hqn2EtSxU4kp99t8tRschSifWD4p/51++0xNWUxw=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "91ca1f82d717b02ceb03a3f423cbe8082ebbb26d",
"type": "github"
},
"original": {
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"revCount": 69,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_2": {
"flake": false,
"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": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1736143030,
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"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-utils": {
"inputs": {
"systems": "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"
}
},
"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"
}
},
"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": [
"nixvim",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737465171,
"narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"git-hooks_2": {
"inputs": {
"flake-compat": [
"stylix",
"flake-compat"
],
"gitignore": "gitignore_2",
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735882644,
"narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"nixvim",
"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"
}
},
"gitignore_2": {
"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": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1737669579,
"narHash": "sha256-v9WQ3c4ctwPMfdBZMZxpdM9xXev4uChce4BxOpvsu0E=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7b9ece1bf3c8780cde9b975b28c2d9ccd7e9cdb9",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737630279,
"narHash": "sha256-wJQCxyMRc4P26zDrHmZiRD5bbfcJpqPG3e2djdGG3pk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0db5c8bfcce78583ebbde0b2abbc95ad93445f7c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1736785676,
"narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
"nixvim",
"nuschtosSearch",
"flake-utils"
],
"nixpkgs": [
"nixvim",
"nuschtosSearch",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729958008,
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.6",
"repo": "ixx",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737504076,
"narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1737469691,
"narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1737525964,
"narHash": "sha256-3wFonKmNRWKq1himW9N3TllbeGIHFACI5vmLpk6moF8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5757bbb8bd7c0630a0cc4bb19c47e588db30b97c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1736798957,
"narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9abb87b552b7f55ac8916b6fc9e5cb486656a2f3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2",
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1737667561,
"narHash": "sha256-BKUapQPTji3V2uxymGq62/UWF1XMjfHvKd565jj1HlA=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "aab2b81792567237c104b90c3936e073d28a9ac6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixvim",
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1737676011,
"narHash": "sha256-NqRCQ98D1LY1txY8juG8ufvdSCfvvnoYjV6U6KLRHQ8=",
"owner": "nix-community",
"repo": "NUR",
"rev": "470a60434e82a09ea60adb564919923e1017feb7",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"nuschtosSearch": {
"inputs": {
"flake-utils": "flake-utils",
"ixx": "ixx",
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737372689,
"narHash": "sha256-nH3zK2ki0fd5o5qvbGHxukE4qnOLJa1uCzoDObG5vrE=",
"owner": "NuschtOS",
"repo": "search",
"rev": "570cc17bbc25650eb7d69e4fcda8cfd2f1656922",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"repo": "search",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
"nur": "nur",
"stylix": "stylix"
}
},
"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_2",
"flake-utils": "flake-utils_2",
"git-hooks": "git-hooks_2",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_3",
"nixpkgs": "nixpkgs_3",
"systems": "systems_2",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1737657729,
"narHash": "sha256-TIDR1zKoP2uaqRot/LnarugfAC9U7geycjbJqA1naVM=",
"owner": "danth",
"repo": "stylix",
"rev": "e594886eb0951a0a0c28ffa333a9df6fb13857a1",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"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,
"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-tmux": {
"flake": false,
"locked": {
"lastModified": 1735737224,
"narHash": "sha256-FO2hRBkZsjlIRqzNHCPc/52yxg11kHGA8MEtSun9RwE=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "aead506a9930c717ebf81cc83a2126e9ca08fa64",
"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": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1737483750,
"narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"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"
}
}
},
"root": "root",
"version": 7
}

49
flake.nix Normal file
View File

@ -0,0 +1,49 @@
{
description = "NixOS system";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix.url = "github:danth/stylix";
nixvim.url = "github:nix-community/nixvim";
nur = {
url = "github:nix-community/NUR";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
nixpkgs,
home-manager,
stylix,
nixvim,
nur,
...
}:
let
baseModules = [
home-manager.nixosModules.home-manager
{
home-manager.sharedModules = [
stylix.homeManagerModules.stylix
nixvim.homeManagerModules.nixvim
nur.modules.homeManager.default
];
}
];
in
{
nixosConfigurations = {
"20212060" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./machines/laptop.nix
] ++ baseModules;
};
};
};
}

View File

@ -1,4 +1,4 @@
{ ... }: { lib, ... }:
{ {
imports = [ imports = [
@ -27,5 +27,35 @@
sudo = true; sudo = true;
configuration = ../users/jan.nix; configuration = ../users/jan.nix;
}; };
# Hardware configuration
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
swapDevices = [ ];
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
fileSystems."/" = {
device = "/dev/disk/by-uuid/3b91eaeb-ea95-4bea-8dc1-f55af7502d23";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/46BF-DE2C";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
}; };
} }

View File

@ -29,11 +29,30 @@ in
unzip unzip
# TODO: MOVE # TODO: MOVE
quickemu quickemu # TODO: Reenable once building this is fixed
pdftk pdftk
# TODO: Move to USB module
# usbutils
# udiskie
# udisks
]; ];
virtualisation.docker.enable = true; security.krb5 = {
enable = true;
settings = {
libdefaults = {
rdns = false;
};
realms = {
"GEWISWG.GEWIS.NL" = {
kdc = [
"https://gewisvdesktop.gewis.nl/KdcProxy"
];
};
};
};
};
modules = { modules = {
# Enable base modules # Enable base modules
@ -42,7 +61,7 @@ in
neovim.enable = true; neovim.enable = true;
systemd-boot.enable = true; systemd-boot.enable = true;
tuigreet.enable = true; tuigreet.enable = true;
tailscale.enable = true; # tailscale.enable = true;
}; };
# TODO: Remove everything below, it is here out of convenience and should be elsewhere # TODO: Remove everything below, it is here out of convenience and should be elsewhere
@ -50,6 +69,10 @@ in
# "9.9.9.9" # "9.9.9.9"
# "149.112.112.112" # "149.112.112.112"
# ]; # ];
# programs.captive-browser.enable = true;
services.resolved = {
enable = true;
};
networking.firewall.enable = true; networking.firewall.enable = true;
programs.dconf.enable = true; programs.dconf.enable = true;
services.libinput.enable = true; services.libinput.enable = true;
@ -58,5 +81,12 @@ in
"nvidia-x11" "nvidia-x11"
"nvidia-settings" "nvidia-settings"
]; ];
nix.settings.experimental-features = "nix-command flakes";
networking.useDHCP = true;
nixpkgs.hostPlatform = "x86_64-linux";
# TODO: Move to USB module
# services.gvfs.enable = true;
services.udisks2.enable = true;
}; };
} }

View File

@ -7,30 +7,6 @@
with lib; with lib;
let let
# Nixvim
nixvim = import (
# builtins.fetchGit {
# url = "https://github.com/nix-community/nixvim";
# # ref = "nixos-24.05";
# }
pkgs.fetchFromGitHub {
owner = "nix-community";
repo = "nixvim";
rev = "e680b367c726e2ae37d541328fe81f8daaf49a6c";
sha256 = "sha256-fYEf0IgsNJp/hcb+C3FKtJvVabPDQs64hdL0izNBwXc=";
}
);
# Stylix
stylix = import (
pkgs.fetchFromGitHub {
owner = "danth";
repo = "stylix";
rev = "5f912cecb4e1c5c794316c4b79b9b5d57d43e100";
sha256 = "sha256-SX1R/WlHEIf9BPT4YBnlVyXRyWNlzYMtKpwXnT9+DPM=";
}
);
# User configuration # User configuration
userModule = types.submodule { userModule = types.submodule {
options = { options = {
@ -56,13 +32,18 @@ in
{ {
imports = [ imports = [
# Import home manager # Import home manager
<home-manager/nixos> # <home-manager/nixos>
# Import system wide configuration required for user modules # Import system wide configuration required for user modules
./modules/systemwide/default.nix ../../user-modules/systemwide/default.nix
]; ];
options = { options = {
machine.sudo-groups = mkOption {
type = types.listOf types.str;
default = [ ];
description = "Groups assigned to sudo users.";
};
machine.users = mkOption { machine.users = mkOption {
type = types.attrsOf userModule; type = types.attrsOf userModule;
default = { }; default = { };
@ -73,14 +54,8 @@ in
config = { config = {
# Add required home manager modules # Add required home manager modules
home-manager.sharedModules = [ home-manager.sharedModules = [
# Stylix for theming
stylix.homeManagerModules.stylix
# Nixvim for neovim
nixvim.homeManagerModules.nixvim
# Modules # Modules
./modules/default.nix ../../user-modules/default.nix
# Custom packages # Custom packages
../../pkgs/default.nix ../../pkgs/default.nix
@ -90,10 +65,12 @@ in
users.users = attrsets.concatMapAttrs (name: value: { users.users = attrsets.concatMapAttrs (name: value: {
${name} = { ${name} = {
isNormalUser = true; isNormalUser = true;
extraGroups = mkIf value.sudo [ extraGroups = mkIf value.sudo (
"wheel" [
"docker" "wheel"
]; ]
++ config.machine.sudo-groups
);
}; };
}) config.machine.users; }) config.machine.users;

View File

@ -4,7 +4,7 @@
{ {
nixpkgs.config = { nixpkgs.config = {
android_sdk.accept_license = true; # android_sdk.accept_license = true; # TODO: Move to android module
packageOverrides = pkgs: { packageOverrides = pkgs: {
dina-vector = pkgs.callPackage ./fonts/dina-vector.nix { }; dina-vector = pkgs.callPackage ./fonts/dina-vector.nix { };
wqy-zenhei = pkgs.callPackage ./fonts/wqy-zenhei.nix { }; wqy-zenhei = pkgs.callPackage ./fonts/wqy-zenhei.nix { };

View File

@ -18,23 +18,14 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
default.browser = mkIf cfg.default "firefox.desktop"; default.browser = mkIf cfg.default "firefox.desktop";
# Enable NUR
nixpkgs.config.packageOverrides = pkgs: {
# TODO: Pin the version
nur = import (builtins.fetchTarball {
url = "https://github.com/nix-community/NUR/archive/f6b1d11161a18420ae699f3202f6cf113f509e8a.tar.gz";
sha256 = "1yj78q8dgvx94mdhd9dy9p7iwxmfl6rx8h0sypfp2x5wzb1sr2g6";
}) { inherit pkgs; };
};
programs.firefox = { programs.firefox = {
enable = true; enable = true;
policies = { policies = {
AppAutoUpdate = false; AppAutoUpdate = false;
# BlockAboutAddons = true; BlockAboutAddons = true;
# BlockAboutConfig = true; BlockAboutConfig = true;
# BlockAboutProfiles = true; BlockAboutProfiles = true;
DisableAppUpdate = true; DisableAppUpdate = true;
DisableFeedbackCommands = true; DisableFeedbackCommands = true;
DisableMasterPasswordCreation = true; DisableMasterPasswordCreation = true;
@ -58,7 +49,6 @@ in
search.default = "DuckDuckGo"; search.default = "DuckDuckGo";
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
# firefox-color
ublock-origin ublock-origin
]; ];

View File

@ -40,7 +40,7 @@ in
enable = true; enable = true;
extraConfig = '' extraConfig = ''
config.set("completion.web_history.max_items", 100) # config.set("completion.web_history.max_items", 30)
config.set("colors.webpage.darkmode.enabled", False) config.set("colors.webpage.darkmode.enabled", False)
config.set("colors.webpage.preferred_color_scheme", "${if theme.darkMode then "dark" else "light"}") config.set("colors.webpage.preferred_color_scheme", "${if theme.darkMode then "dark" else "light"}")
config.set("fonts.default_family", "${theme.fonts.monospace.name}") config.set("fonts.default_family", "${theme.fonts.monospace.name}")

View File

@ -9,9 +9,11 @@
./browser/default.nix ./browser/default.nix
./btop/default.nix ./btop/default.nix
./desktop/default.nix ./desktop/default.nix
./development/default.nix
./discord/default.nix ./discord/default.nix
./feishin/default.nix ./feishin/default.nix
./fontconfig/default.nix ./fontconfig/default.nix
./games/modrinth.nix
./git/default.nix ./git/default.nix
./language/cpp.nix ./language/cpp.nix
./language/haskell.nix ./language/haskell.nix
@ -40,6 +42,6 @@
./zathura/default.nix ./zathura/default.nix
# Import unfree helper # Import unfree helper
../../unfree/default.nix ../modules/unfree/default.nix
]; ];
} }

View File

@ -27,6 +27,8 @@ in
brightnessctl brightnessctl
river-filtile river-filtile
# owm # owm
udiskie # TODO: Move to USB module
]; ];
# Change desktop to execute river # Change desktop to execute river
@ -106,10 +108,12 @@ in
border-color-unfocused = "0x${colors.border-unfocused}"; # TODO: Change to use named color; border-color-unfocused = "0x${colors.border-unfocused}"; # TODO: Change to use named color;
border-color-urgent = "0x${colors.fg}"; border-color-urgent = "0x${colors.fg}";
# TODO: Make a desktop options for DE applications
spawn = [ spawn = [
"\"${layout} ${layoutOptions}\"" "\"${layout} ${layoutOptions}\""
"waybar" # TODO: Decouple "waybar" # TODO: Decouple
"\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\"" "\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\""
"udiskie"
]; ];
map = ( map = (
lib.attrsets.recursiveUpdate lib.attrsets.recursiveUpdate
@ -124,7 +128,8 @@ in
"${ssm} Return" = "spawn foot"; "${ssm} Return" = "spawn foot";
"${main} P" = "spawn \"rofi -show drun\""; "${main} P" = "spawn \"rofi -show drun\"";
"${ssm} P" = "spawn rofi-rbw"; "${ssm} P" = "spawn rofi-rbw";
"${main} S" = "spawn \"grim -g \\\"\\\$(slurp)\\\" ~/Images/Screenshots/\\\$(date +'%s_grim.png')\""; "${main} S" =
"spawn \"grim -g \\\"\\\$(slurp)\\\" ~/Images/Screenshots/\\\$(date +'%s_grim.png')\"";
# Window focus # Window focus
"${main} J" = "focus-view next"; "${main} J" = "focus-view next";

View File

@ -0,0 +1,8 @@
{ ... }:
{
imports = [
# Import systemwide configuration files.
./utilities/docker.nix
];
}

View File

@ -0,0 +1,41 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.docker;
in
{
options.modules.docker = {
enable = mkEnableOption "docker";
};
config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [
docker
docker-compose
];
# Allow unfree
modules.unfree.allowedPackages = [
];
# VSCode configuration
programs.vscode = {
extensions = with pkgs.vscode-extensions; [
ms-azuretools.vscode-docker
];
userSettings = {
};
};
# Neovim configuration
programs.nixvim = { };
};
}

View File

@ -0,0 +1,27 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
cfg = config.modules.modrinth;
in
{
options.modules.modrinth = {
enable = mkEnableOption "modrinth";
};
config = mkIf cfg.enable {
modules.unfree.allowedPackages = [
"modrinth-app"
"modrinth-app-unwrapped"
];
home.packages = with pkgs; [
modrinth-app
];
};
}

View File

@ -19,9 +19,9 @@ in
modules.unfree.allowedPackages = [ modules.unfree.allowedPackages = [
"vscode-extension-ms-vscode-cpptools" "vscode-extension-ms-vscode-cpptools"
# TODO: Remove, it should not be here # TODO: Remove, it should not be here
"android-studio-stable" # "android-studio-stable"
"android-sdk-cmdline-tools" # "android-sdk-cmdline-tools"
"android-sdk-tools" # "android-sdk-tools"
]; ];
# Gitignore additions # Gitignore additions

View File

@ -5,6 +5,7 @@
... ...
}: }:
# TODO: Move to a module for notebooks in general
with lib; with lib;
let let
cfg = config.modules.jupyter; cfg = config.modules.jupyter;
@ -16,7 +17,9 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Development packages # Development packages
home.packages = with pkgs; [ ]; home.packages = with pkgs; [
evcxr
];
modules.python.extraPythonPackages = p: [ modules.python.extraPythonPackages = p: [
p.jupyter p.jupyter

View File

@ -3,6 +3,7 @@
{ {
imports = [ imports = [
# Import systemwide configuration files. # Import systemwide configuration files.
./docker.nix
./river.nix ./river.nix
./steam.nix ./steam.nix
./waylock.nix ./waylock.nix

View File

@ -0,0 +1,17 @@
{
lib,
config,
pkgs,
...
}:
with lib;
let
enabled = any (user: user.modules.docker.enable) (attrValues config.home-manager.users);
in
{
config = mkIf enabled {
virtualisation.docker.enable = true;
machine.sudo-groups = [ "docker" ];
};
}

View File

@ -1,7 +1,6 @@
{ {
lib, lib,
config, config,
pkgs,
... ...
}: }:

View File

@ -47,7 +47,6 @@ in
github.copilot-chat github.copilot-chat
tomoki1207.pdf tomoki1207.pdf
ms-vsliveshare.vsliveshare ms-vsliveshare.vsliveshare
ms-azuretools.vscode-docker
]; ];
userSettings = { userSettings = {

View File

@ -12,15 +12,17 @@
libreoffice-still libreoffice-still
remmina remmina
# dina-vector # dina-vector
android-studio # android-studio
docker # jellyfin-tui
docker-compose
jellyfin-tui
pinentry pinentry
thunderbird thunderbird
signal-desktop signal-desktop
prusa-slicer
freecad-wayland
# appflowy
]; ];
# TODO: Move to gpg module
programs.gpg = { programs.gpg = {
enable = true; enable = true;
mutableKeys = true; mutableKeys = true;
@ -62,10 +64,11 @@
# Gaming # Gaming
steam.enable = true; steam.enable = true;
modrinth.enable = true;
# Media # Media
spotify.enable = true; spotify.enable = true;
feishin.enable = true; feishin.enable = false;
# Tools # Tools
rofi-rbw.enable = true; rofi-rbw.enable = true;
@ -84,6 +87,7 @@
# Development # Development
neovim.enable = true; neovim.enable = true;
vscode.enable = true; vscode.enable = true;
docker.enable = true;
# Languages # Languages
haskell.enable = false; haskell.enable = false;
@ -118,24 +122,14 @@
darkMode = false; darkMode = false;
}; };
themes.catppuccin = { themes.catppuccin = {
enable = false; enable = true;
flavor = "latte"; flavor = "mocha";
}; };
themes.sakura.enable = false; themes.sakura.enable = false;
themes.nord = { themes.nord = {
enable = true; enable = false;
darkMode = true; darkMode = true;
}; };
# TODO: Remove
# Nice themes:
# - rose-pine-dawn: Decent, bit too yellow though.
# - sagelight: Barely readable
# - danqing-light: Too minty
# - fruit-soda: Colors too bright, background too dark.
# - solarflare-light: Nice
# darkMode = false;
# colorScheme = "${pkgs.base16-schemes}/share/themes/solarflare-light.yaml";
}; };
# TODO: Remove everything below, it is here out of convenience and should be elsewhere # TODO: Remove everything below, it is here out of convenience and should be elsewhere