mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
commit
267c03f8e5
288 changed files with 11935 additions and 10080 deletions
10735
SwarselSystems.org
10735
SwarselSystems.org
File diff suppressed because it is too large
Load diff
211
flake.lock
generated
211
flake.lock
generated
|
|
@ -84,11 +84,11 @@
|
||||||
},
|
},
|
||||||
"crane_2": {
|
"crane_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739053031,
|
"lastModified": 1743700120,
|
||||||
"narHash": "sha256-LrMDRuwAlRFD2T4MgBSRd1s2VtOE+Vl1oMCNu3RpPE0=",
|
"narHash": "sha256-8BjG/P0xnuCyVOXlYRwdI1B8nVtyYLf3oDwPSimqREY=",
|
||||||
"owner": "ipetkov",
|
"owner": "ipetkov",
|
||||||
"repo": "crane",
|
"repo": "crane",
|
||||||
"rev": "112e6591b2d6313b1bd05a80a754a8ee42432a7e",
|
"rev": "e316f19ee058e6db50075115783be57ac549c389",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -125,11 +125,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741684000,
|
"lastModified": 1744940522,
|
||||||
"narHash": "sha256-NQykaWIrn5zilncefIvW4jPQ76YMXVK/dMTzkSVDmdk=",
|
"narHash": "sha256-TNoetfICvd29DhxRPpmyKItQBDlqSvKcV+wGNkn14jk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "2db1d64fc084b1d15e3871dffc02c62a94ed6ed7",
|
"rev": "51d33bbb7f1e74ba5f9d9a77357735149da99081",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -146,11 +146,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741710368,
|
"lastModified": 1744967866,
|
||||||
"narHash": "sha256-P9Qt8QQC6cFssiIvNEmj8BabRZS7EWMqCrA3oNj70x4=",
|
"narHash": "sha256-jWHOSSZ03R1Dvru5rXEForMgkV1RAsCd+IjMmehpmFg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "2695d53827b4200a195f932a5beb47fe5f9e3213",
|
"rev": "c54fd7dc3e696136c8257abfe12815274b42660e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -162,11 +162,11 @@
|
||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741628778,
|
"lastModified": 1743774811,
|
||||||
"narHash": "sha256-RsvHGNTmO2e/eVfgYK7g+eYEdwwh7SbZa+gZkT24MEA=",
|
"narHash": "sha256-oiHLDHXq7ymsMVYSg92dD1OLnKLQoU/Gf2F1GoONLCE=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "firefox-gnome-theme",
|
"repo": "firefox-gnome-theme",
|
||||||
"rev": "5a81d390bb64afd4e81221749ec4bffcbeb5fa80",
|
"rev": "df53a7a31872faf5ca53dd0730038a62ec63ca9e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -446,11 +446,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741868525,
|
"lastModified": 1743661097,
|
||||||
"narHash": "sha256-jikLF3o6cmIwTq3BNE1KZADzL/OprjACoVkrJEKf8hQ=",
|
"narHash": "sha256-ZSx9BdbW+/4k3Pmecl7ZhpHXnpreuAgYxrRaJC8VmuU=",
|
||||||
"owner": "TamtamHero",
|
"owner": "TamtamHero",
|
||||||
"repo": "fw-fanctrl",
|
"repo": "fw-fanctrl",
|
||||||
"rev": "f97a5e9447c6def10f097d8dbd449ebb4e3ed253",
|
"rev": "473575cd1753cb4ec429ea085975e48d32970894",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -473,11 +473,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741379162,
|
"lastModified": 1742649964,
|
||||||
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
|
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
|
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -597,11 +597,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741701235,
|
"lastModified": 1744919155,
|
||||||
"narHash": "sha256-gBlb8R9gnjUAT5XabJeel3C2iEUiBHx3+91651y3Sqo=",
|
"narHash": "sha256-IJksPW32V9gid9vDxoloJMRk+YGjxq5drFHBFeBkKU8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "c630dfa8abcc65984cc1e47fb25d4552c81dd37e",
|
"rev": "72526a5f7cde2ef9075637802a1e2a8d2d658f70",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -639,11 +639,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741635347,
|
"lastModified": 1743869639,
|
||||||
"narHash": "sha256-2aYfV44h18alHXopyfL4D9GsnpE5XlSVkp4MGe586VU=",
|
"narHash": "sha256-Xhe3whfRW/Ay05z9m1EZ1/AkbV1yo0tm1CbgjtCi4rQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7fb8678716c158642ac42f9ff7a18c0800fea551",
|
"rev": "d094c6763c6ddb860580e7d3b4201f8f496a6836",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -697,11 +697,11 @@
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740094523,
|
"lastModified": 1744704014,
|
||||||
"narHash": "sha256-vGxTGexcKN8BVunczdqps1dbu0khOFp0++Gvip9QZJ8=",
|
"narHash": "sha256-UGq8nYSq/feyP0bUjd88jHXA7wJMaSPbtRByp7ZOD30=",
|
||||||
"owner": "thiagokokada",
|
"owner": "thiagokokada",
|
||||||
"repo": "nix-alien",
|
"repo": "nix-alien",
|
||||||
"rev": "ab175cdbbad2a93afc86125eb0835694b005b2fb",
|
"rev": "9b92bd3b3d54e02aa0b1881af435802567c2dca9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -717,11 +717,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741229100,
|
"lastModified": 1744478979,
|
||||||
"narHash": "sha256-0HwrTDXp9buEwal/1ymK9uQmzUD5ozIA7CJGqnT/gLs=",
|
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "adf5c88ba1fe21af5c083b4d655004431f20c5ab",
|
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -761,11 +761,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739071773,
|
"lastModified": 1744518957,
|
||||||
"narHash": "sha256-/Ak+Quinhmdxa9m3shjm4lwwwqmzG8zzGhhhhgR1k9I=",
|
"narHash": "sha256-RLBSWQfTL0v+7uyskC5kP6slLK1jvIuhaAh8QvB75m4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "895d81b6228bbd50a6ef22f5a58a504ca99763ea",
|
"rev": "4fc9ea78c962904f4ea11046f3db37c62e8a02fd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -781,11 +781,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741619381,
|
"lastModified": 1744518957,
|
||||||
"narHash": "sha256-koZtlJRqi0/MD/AKd0KrXLA2NuBOVzlIyAJprjzpxZE=",
|
"narHash": "sha256-RLBSWQfTL0v+7uyskC5kP6slLK1jvIuhaAh8QvB75m4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "66537fb185462ba9b07f4e6f2d54894a1b2d04ab",
|
"rev": "4fc9ea78c962904f4ea11046f3db37c62e8a02fd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -846,11 +846,11 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738246091,
|
"lastModified": 1744142264,
|
||||||
"narHash": "sha256-2+KkZsRO+XlOFbXbRgMZbRtlqn5MBNYj4HNmZ/2Tojg=",
|
"narHash": "sha256-h5KyodobZm8dx/HSNN+basgdmjxrQxudjrss4gAQpZk=",
|
||||||
"owner": "oddlama",
|
"owner": "oddlama",
|
||||||
"repo": "nix-topology",
|
"repo": "nix-topology",
|
||||||
"rev": "5526269fa3eedf4f4bc00c0bf7a03db31d24b029",
|
"rev": "f49121cbbf4a86c560638ade406d99ee58deb7aa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -901,11 +901,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740947705,
|
"lastModified": 1742568034,
|
||||||
"narHash": "sha256-Co2kAD2SZalOm+5zoxmzEVZNvZ17TyafuFsD46BwSdY=",
|
"narHash": "sha256-QaMEhcnscfF2MqB7flZr+sLJMMYZPnvqO4NYf9B4G38=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "507911df8c35939050ae324caccc7cf4ffb76565",
|
"rev": "42ee229088490e3777ed7d1162cb9e9d8c3dbb11",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -916,11 +916,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741325094,
|
"lastModified": 1744633460,
|
||||||
"narHash": "sha256-RUAdT8dZ6k/486vnu3tiNRrNW6+Q8uSD2Mq7gTX4jlo=",
|
"narHash": "sha256-fbWE4Xpw6eH0Q6in+ymNuDwTkqmFmtxcQEmtRuKDTTk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "b48cc4dab0f9711af296fc367b6108cf7b8ccb16",
|
"rev": "9a049b4a421076d27fee3eec664a18b2066824cb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -992,11 +992,27 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741600792,
|
"lastModified": 1744440957,
|
||||||
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
|
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
|
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable24_11": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1744440957,
|
||||||
|
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1008,11 +1024,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741600792,
|
"lastModified": 1744440957,
|
||||||
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
|
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
|
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1024,11 +1040,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_10": {
|
"nixpkgs_10": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739138025,
|
"lastModified": 1743689281,
|
||||||
"narHash": "sha256-M4ilIfGxzbBZuURokv24aqJTbdjPA9K+DtKUzrJaES4=",
|
"narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b2243f41e860ac85c0b446eadc6930359b294e79",
|
"rev": "2bfc080955153be0be56724be6fa5477b4eefabb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1040,11 +1056,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739446958,
|
"lastModified": 1744463964,
|
||||||
"narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=",
|
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "2ff53fe64443980e139eaa286017f53f88336dd0",
|
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1087,17 +1103,17 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741680361,
|
"lastModified": 1745391562,
|
||||||
"narHash": "sha256-SxKcbEuuLHlEc0GBO776DX+Zvi1ESe6avChu3uoA32w=",
|
"narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5f385baff93c728400d2c4ec8c9b0745b8f9e5b6",
|
"rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5f385baff93c728400d2c4ec8c9b0745b8f9e5b6",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -1119,11 +1135,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_7": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741513245,
|
"lastModified": 1744463964,
|
||||||
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
|
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
|
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1135,11 +1151,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_8": {
|
"nixpkgs_8": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731763621,
|
"lastModified": 1744502386,
|
||||||
"narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=",
|
"narHash": "sha256-QAd1L37eU7ktL2WeLLLTmI6P9moz9+a/ONO8qNBYJgM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d",
|
"rev": "f6db44a8daa59c40ae41ba6e5823ec77fe0d2124",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1151,11 +1167,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_9": {
|
"nixpkgs_9": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741513245,
|
"lastModified": 1743583204,
|
||||||
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
|
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1",
|
"rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1245,11 +1261,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741723036,
|
"lastModified": 1744971000,
|
||||||
"narHash": "sha256-L9tVnZpa6Cb0DgSStIbV5QPRAQ8F94UvKcfiQ1ZZSAA=",
|
"narHash": "sha256-WwJZZ1ChbwUWzsZWA4rUvWaISrZ9/+OB2qc3XZbbjTg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "20ff961c7fbaf9ecb7a808c0e27bb0984d93f74f",
|
"rev": "c2d387e6f9e895853816a13d5c84f05f0675e1ea",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1268,11 +1284,11 @@
|
||||||
"treefmt-nix": "treefmt-nix_2"
|
"treefmt-nix": "treefmt-nix_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741693509,
|
"lastModified": 1743884191,
|
||||||
"narHash": "sha256-emkxnsZstiJWmGACimyAYqIKz2Qz5We5h1oBVDyQjLw=",
|
"narHash": "sha256-foVcginhVvjg8ZnTzY5wwMeZ4wjJ8yX66PW5kgyivPE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "5479646b2574837f1899da78bdf9a48b75a9fb27",
|
"rev": "fde90f5f52e13eed110a0e53a2818a2b09e4d37c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1343,11 +1359,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741379162,
|
"lastModified": 1742649964,
|
||||||
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
|
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
|
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1375,6 +1391,7 @@
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_5",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
|
"nixpkgs-stable24_11": "nixpkgs-stable24_11",
|
||||||
"nswitch-rcm-nix": "nswitch-rcm-nix",
|
"nswitch-rcm-nix": "nswitch-rcm-nix",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_2",
|
"pre-commit-hooks": "pre-commit-hooks_2",
|
||||||
|
|
@ -1414,11 +1431,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739240901,
|
"lastModified": 1743682350,
|
||||||
"narHash": "sha256-YDtl/9w71m5WcZvbEroYoWrjECDhzJZLZ8E68S3BYok=",
|
"narHash": "sha256-S/MyKOFajCiBm5H5laoE59wB6w0NJ4wJG53iAPfYW3k=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "03473e2af8a4b490f4d2cdb2e4d3b75f82c8197c",
|
"rev": "c4a8327b0f25d1d81edecbb6105f74d7cf9d7382",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1448,11 +1465,11 @@
|
||||||
"nixpkgs": "nixpkgs_8"
|
"nixpkgs": "nixpkgs_8"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741644481,
|
"lastModified": 1744669848,
|
||||||
"narHash": "sha256-E0RrMykMtEv15V3QhpsFutgoSKhL1JBhidn+iZajOyg=",
|
"narHash": "sha256-pXyanHLUzLNd3MX9vsWG+6Z2hTU8niyphWstYEP3/GU=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "e653d71e82575a43fe9d228def8eddb73887b866",
|
"rev": "61154300d945f0b147b30d24ddcafa159148026a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1483,11 +1500,11 @@
|
||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741706258,
|
"lastModified": 1744910471,
|
||||||
"narHash": "sha256-Frn1vjiJlyzI9QcosZNWDrgKQjoCbsNAkCrLw2pUYZ4=",
|
"narHash": "sha256-HItOUMA2whFnPMJuyN2XHq9TZttgrgOAZcoUXsaD4Js=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "4a8718e5a14faeef3e57ededb4efb88b0deed329",
|
"rev": "8d5cd725ad591890c0cd804bf68cc842b8afca51",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1608,11 +1625,11 @@
|
||||||
"tinted-schemes": {
|
"tinted-schemes": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741468895,
|
"lastModified": 1742851696,
|
||||||
"narHash": "sha256-YKM1RJbL68Yp2vESBqeZQBjTETXo8mCTTzLZyckCfZk=",
|
"narHash": "sha256-sR4K+OVFKeUOvNIqcCr5Br7NLxOBEwoAgsIyjsZmb8s=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "schemes",
|
"repo": "schemes",
|
||||||
"rev": "47c8c7726e98069cade5827e5fb2bfee02ce6991",
|
"rev": "c37771c4ae8ff1667e27ddcf24991ebeb94a4e77",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1624,11 +1641,11 @@
|
||||||
"tinted-tmux": {
|
"tinted-tmux": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740877430,
|
"lastModified": 1743296873,
|
||||||
"narHash": "sha256-zWcCXgdC4/owfH/eEXx26y5BLzTrefjtSLFHWVD5KxU=",
|
"narHash": "sha256-8IQulrb1OBSxMwdKijO9fB70ON//V32dpK9Uioy7FzY=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "tinted-tmux",
|
"repo": "tinted-tmux",
|
||||||
"rev": "d48ee86394cbe45b112ba23ab63e33656090edb4",
|
"rev": "af5152c8d7546dfb4ff6df94080bf5ff54f64e3a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -1726,11 +1743,11 @@
|
||||||
"rust-overlay": "rust-overlay_2"
|
"rust-overlay": "rust-overlay_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1740510704,
|
"lastModified": 1743838985,
|
||||||
"narHash": "sha256-AMGLqcSS9eNWM1K2lm7lZz5t6RFHgLSNTAGI1vYF2VY=",
|
"narHash": "sha256-7fmg1fPEJWdCrw2QsanIAA0TT10IvUImZyWbvoSPebA=",
|
||||||
"owner": "dj95",
|
"owner": "dj95",
|
||||||
"repo": "zjstatus",
|
"repo": "zjstatus",
|
||||||
"rev": "331ae24595e0c1c612f343547559d1e058128646",
|
"rev": "d27f0819903b5f31d527affa875c71cb5c2a8578",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
17
flake.nix
17
flake.nix
|
|
@ -13,8 +13,9 @@
|
||||||
};
|
};
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?rev=5f385baff93c728400d2c4ec8c9b0745b8f9e5b6";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
nixpkgs-stable24_11.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
systems.url = "github:nix-systems/default-linux";
|
systems.url = "github:nix-systems/default-linux";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
|
|
@ -97,8 +98,8 @@
|
||||||
{
|
{
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
|
||||||
nixosModules = import ./modules/nixos { inherit lib; };
|
# nixosModules = import ./modules/nixos { inherit lib; };
|
||||||
homeModules = import ./modules/home { inherit lib; };
|
# homeModules = import ./modules/home { inherit lib; };
|
||||||
packages = lib.swarselsystems.forEachSystem (pkgs: import ./pkgs { inherit lib pkgs; });
|
packages = lib.swarselsystems.forEachSystem (pkgs: import ./pkgs { inherit lib pkgs; });
|
||||||
formatter = lib.swarselsystems.forEachSystem (pkgs: pkgs.nixpkgs-fmt);
|
formatter = lib.swarselsystems.forEachSystem (pkgs: pkgs.nixpkgs-fmt);
|
||||||
overlays = import ./overlays { inherit self lib inputs; };
|
overlays = import ./overlays { inherit self lib inputs; };
|
||||||
|
|
@ -113,10 +114,11 @@
|
||||||
];
|
];
|
||||||
appSet = lib.swarselsystems.mkApps system appNames self;
|
appSet = lib.swarselsystems.mkApps system appNames self;
|
||||||
in
|
in
|
||||||
{
|
|
||||||
inherit appSet;
|
appSet // {
|
||||||
default = appSet.bootstrap;
|
default = appSet.swarsel-bootstrap;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
devShells = lib.swarselsystems.forAllSystems (system:
|
devShells = lib.swarselsystems.forAllSystems (system:
|
||||||
let
|
let
|
||||||
|
|
@ -155,7 +157,6 @@
|
||||||
|
|
||||||
diskoConfigurations.default = import .templates/hosts/nixos/disk-config.nix;
|
diskoConfigurations.default = import .templates/hosts/nixos/disk-config.nix;
|
||||||
|
|
||||||
|
|
||||||
nixosConfigurations =
|
nixosConfigurations =
|
||||||
lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "nixos") "nixos";
|
lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "nixos") "nixos";
|
||||||
homeConfigurations =
|
homeConfigurations =
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,9 @@
|
||||||
inputs.stylix.homeManagerModules.stylix
|
inputs.stylix.homeManagerModules.stylix
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
inputs.nix-index-database.hmModules.nix-index
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
./profiles/home/common
|
./modules/home/common
|
||||||
] ++ (builtins.attrValues outputs.homeModules);
|
"${self}/modules/home/common/sharedsetup.nix"
|
||||||
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [ outputs.overlays.default ];
|
overlays = [ outputs.overlays.default ];
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
{ self, config, pkgs, lib, primaryUser, ... }:
|
{ self, inputs, config, pkgs, lib, primaryUser, ... }:
|
||||||
let
|
let
|
||||||
profilesPath = "${self}/profiles";
|
sharedOptions = {
|
||||||
|
isBtrfs = false;
|
||||||
|
isLinux = true;
|
||||||
|
isPublic = true;
|
||||||
|
profiles = {
|
||||||
|
chaostheatre = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -10,7 +17,15 @@ in
|
||||||
{
|
{
|
||||||
_module.args.diskDevice = config.swarselsystems.rootDisk;
|
_module.args.diskDevice = config.swarselsystems.rootDisk;
|
||||||
}
|
}
|
||||||
"${profilesPath}/nixos/optional/autologin.nix"
|
"${self}/hosts/nixos/chaostheatre/options.nix"
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.users."${primaryUser}".imports = [
|
||||||
|
"${self}/modules/home/common/settings.nix"
|
||||||
|
"${self}/hosts/nixos/chaostheatre/options-home.nix"
|
||||||
|
"${self}/modules/home/common/sharedsetup.nix"
|
||||||
|
];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
|
|
@ -31,21 +46,25 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
swarselsystems = {
|
swarselsystems = lib.recursiveUpdate
|
||||||
wallpaper = self + /wallpaper/lenovowp.png;
|
{
|
||||||
initialSetup = true;
|
wallpaper = self + /wallpaper/lenovowp.png;
|
||||||
isPublic = true;
|
initialSetup = true;
|
||||||
isLinux = true;
|
isImpermanence = true;
|
||||||
isImpermanence = true;
|
isCrypted = true;
|
||||||
isCrypted = true;
|
isSecureBoot = false;
|
||||||
isSecureBoot = false;
|
isSwap = true;
|
||||||
isSwap = true;
|
swapSize = "4G";
|
||||||
swapSize = "4G";
|
rootDisk = "/dev/vda";
|
||||||
rootDisk = "/dev/vda";
|
}
|
||||||
};
|
sharedOptions;
|
||||||
|
|
||||||
home-manager.users."${primaryUser}".swarselsystems = {
|
home-manager.users."${primaryUser}" = {
|
||||||
isNixos = true;
|
home.stateVersion = lib.mkForce "23.05";
|
||||||
isPublic = true;
|
swarselsystems = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
isNixos = true;
|
||||||
|
}
|
||||||
|
sharedOptions;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
hosts/nixos/chaostheatre/options-home.nix
Normal file
2
hosts/nixos/chaostheatre/options-home.nix
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
_:
|
||||||
|
{ }
|
||||||
2
hosts/nixos/chaostheatre/options.nix
Normal file
2
hosts/nixos/chaostheatre/options.nix
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
_:
|
||||||
|
{ }
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ self, pkgs, inputs, outputs, config, lib, modulesPath, primaryUser ? "swarsel", ... }:
|
{ self, pkgs, inputs, config, lib, modulesPath, primaryUser ? "swarsel", ... }:
|
||||||
let
|
let
|
||||||
pubKeys = lib.filesystem.listFilesRecursive "${self}/secrets/keys/ssh";
|
pubKeys = lib.filesystem.listFilesRecursive "${self}/secrets/keys/ssh";
|
||||||
in
|
in
|
||||||
|
|
@ -8,22 +8,29 @@ in
|
||||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||||
"${modulesPath}/installer/cd-dvd/channel.nix"
|
"${modulesPath}/installer/cd-dvd/channel.nix"
|
||||||
|
|
||||||
"${self}/profiles/iso/minimal.nix"
|
"${self}/modules/iso/minimal.nix"
|
||||||
|
"${self}/modules/nixos/common/sharedsetup.nix"
|
||||||
|
"${self}/modules/home/common/sharedsetup.nix"
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users."${primaryUser}".imports = [
|
home-manager.users."${primaryUser}".imports = [
|
||||||
"${self}/profiles/home/common/settings.nix"
|
"${self}/modules/home/common/settings.nix"
|
||||||
] ++ (builtins.attrValues outputs.homeModules);
|
"${self}/modules/home/common/sharedsetup.nix"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users."${primaryUser}".home = {
|
home-manager.users."${primaryUser}" = {
|
||||||
file = {
|
home = {
|
||||||
".bash_history" = {
|
stateVersion = "23.05";
|
||||||
source = self + /programs/bash/.bash_history;
|
file = {
|
||||||
|
".bash_history" = {
|
||||||
|
source = self + /programs/bash/.bash_history;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
swarselsystems.modules.general = lib.mkForce true;
|
||||||
};
|
};
|
||||||
home-manager.users.root.home = {
|
home-manager.users.root.home = {
|
||||||
stateVersion = "23.05";
|
stateVersion = "23.05";
|
||||||
|
|
|
||||||
|
|
@ -1,230 +1,77 @@
|
||||||
{ self, inputs, lib, primaryUser, ... }:
|
{ self, inputs, lib, primaryUser, ... }:
|
||||||
let
|
let
|
||||||
secretsDirectory = builtins.toString inputs.nix-secrets;
|
secretsDirectory = builtins.toString inputs.nix-secrets;
|
||||||
profilesPath = "${self}/profiles";
|
|
||||||
sharedOptions = {
|
sharedOptions = {
|
||||||
isBtrfs = true;
|
isBtrfs = true;
|
||||||
isLinux = true;
|
isLinux = true;
|
||||||
sharescreen = "eDP-2";
|
sharescreen = "eDP-2";
|
||||||
|
profiles = {
|
||||||
|
personal = true;
|
||||||
|
work = true;
|
||||||
|
framework = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
|
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
|
||||||
inputs.fw-fanctrl.nixosModules.default
|
|
||||||
|
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
"${profilesPath}/nixos/optional/virtualbox.nix"
|
|
||||||
# "${profilesPath}/nixos/optional/vmware.nix"
|
|
||||||
"${profilesPath}/nixos/optional/autologin.nix"
|
|
||||||
"${profilesPath}/nixos/optional/nswitch-rcm.nix"
|
|
||||||
"${profilesPath}/nixos/optional/gaming.nix"
|
|
||||||
"${profilesPath}/nixos/optional/work.nix"
|
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.users."${primaryUser}".imports = [
|
|
||||||
"${profilesPath}/home/optional/gaming.nix"
|
|
||||||
"${profilesPath}/home/optional/work.nix"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
networking.networkmanager.wifi.scanRandMacAddress = false;
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
supportedFilesystems = [ "btrfs" ];
|
|
||||||
# kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
|
||||||
kernelParams = [
|
|
||||||
"resume_offset=533760"
|
|
||||||
];
|
|
||||||
resumeDevice = "/dev/disk/by-label/nixos";
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware = {
|
|
||||||
enableAllFirmware = true;
|
|
||||||
cpu.amd.updateMicrocode = true;
|
|
||||||
amdgpu = {
|
|
||||||
opencl.enable = true;
|
|
||||||
amdvlk = {
|
|
||||||
enable = true;
|
|
||||||
support32Bit.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fw-fanctrl = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
defaultStrategy = "lazy";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-hostname";
|
|
||||||
fqdn = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-fqdn";
|
|
||||||
firewall.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
services = {
|
|
||||||
fwupd = {
|
|
||||||
enable = true;
|
|
||||||
# framework also uses lvfs-testing, but I do not want to use it
|
|
||||||
extraRemotes = [ "lvfs" ];
|
|
||||||
};
|
|
||||||
udev.extraRules = ''
|
|
||||||
# disable Wakeup on Framework Laptop 16 Keyboard (ANSI)
|
|
||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", ATTR{power/wakeup}="disabled"
|
|
||||||
# disable Wakeup on Framework Laptop 16 Numpad Module
|
|
||||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0014", ATTR{power/wakeup}="disabled"
|
|
||||||
# disable Wakeup on Framework Laptop 16 Trackpad
|
|
||||||
ACTION=="add", SUBSYSTEM=="i2c", DRIVERS=="i2c_hid_acpi", ATTRS{name}=="PIXA3854:00", ATTR{power/wakeup}="disabled"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
swarselsystems = lib.recursiveUpdate
|
swarselsystems = lib.recursiveUpdate
|
||||||
{
|
{
|
||||||
|
firewall = lib.mkForce true;
|
||||||
wallpaper = self + /wallpaper/lenovowp.png;
|
wallpaper = self + /wallpaper/lenovowp.png;
|
||||||
hasBluetooth = true;
|
hasBluetooth = true;
|
||||||
hasFingerprint = true;
|
hasFingerprint = true;
|
||||||
isImpermanence = false;
|
isImpermanence = false;
|
||||||
isSecureBoot = true;
|
isSecureBoot = true;
|
||||||
isCrypted = true;
|
isCrypted = true;
|
||||||
|
hostName = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-hostname";
|
||||||
|
fqdn = lib.swarselsystems.getSecret "${secretsDirectory}/work/worklaptop-fqdn";
|
||||||
|
hibernation.offset = 533760;
|
||||||
|
profiles = {
|
||||||
|
amdcpu = true;
|
||||||
|
amdgpu = true;
|
||||||
|
hibernation = true;
|
||||||
|
btrfs = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
sharedOptions;
|
sharedOptions;
|
||||||
|
|
||||||
home-manager.users."${primaryUser}".swarselsystems = lib.recursiveUpdate
|
home-manager.users."${primaryUser}" = {
|
||||||
{
|
home.stateVersion = lib.mkForce "23.05";
|
||||||
isLaptop = true;
|
swarselsystems = lib.recursiveUpdate
|
||||||
isNixos = true;
|
{
|
||||||
isSecondaryGpu = true;
|
isLaptop = true;
|
||||||
SecondaryGpuCard = "pci-0000_03_00_0";
|
isNixos = true;
|
||||||
cpuCount = 16;
|
isSecondaryGpu = true;
|
||||||
temperatureHwmon = {
|
SecondaryGpuCard = "pci-0000_03_00_0";
|
||||||
isAbsolutePath = true;
|
cpuCount = 16;
|
||||||
path = "/sys/devices/virtual/thermal/thermal_zone0/";
|
temperatureHwmon = {
|
||||||
input-filename = "temp4_input";
|
isAbsolutePath = true;
|
||||||
};
|
path = "/sys/devices/virtual/thermal/thermal_zone0/";
|
||||||
startup = [
|
input-filename = "temp4_input";
|
||||||
{ command = "nextcloud --background"; }
|
|
||||||
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
|
||||||
{ command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
|
||||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
|
||||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
|
||||||
{ command = "nm-applet"; }
|
|
||||||
{ command = "teams-for-linux"; }
|
|
||||||
{ command = "1password"; }
|
|
||||||
{ command = "feishin"; }
|
|
||||||
];
|
|
||||||
lowResolution = "1280x800";
|
|
||||||
highResolution = "2560x1600";
|
|
||||||
monitors = {
|
|
||||||
main = {
|
|
||||||
name = "BOE 0x0BC9 Unknown";
|
|
||||||
mode = "2560x1600"; # TEMPLATE
|
|
||||||
scale = "1";
|
|
||||||
position = "2560,0";
|
|
||||||
workspace = "15:L";
|
|
||||||
output = "eDP-2";
|
|
||||||
};
|
};
|
||||||
homedesktop = {
|
lowResolution = "1280x800";
|
||||||
name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
|
highResolution = "2560x1600";
|
||||||
mode = "2560x1440";
|
monitors = {
|
||||||
scale = "1";
|
main = {
|
||||||
position = "0,0";
|
name = "BOE 0x0BC9 Unknown";
|
||||||
workspace = "1:一";
|
mode = "2560x1600"; # TEMPLATE
|
||||||
output = "DP-11";
|
scale = "1";
|
||||||
|
position = "2560,0";
|
||||||
|
workspace = "15:L";
|
||||||
|
output = "eDP-2";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
work_back_middle = {
|
}
|
||||||
name = "LG Electronics LG Ultra HD 0x000305A6";
|
sharedOptions;
|
||||||
mode = "2560x1440";
|
};
|
||||||
scale = "1";
|
|
||||||
position = "5120,0";
|
|
||||||
workspace = "1:一";
|
|
||||||
output = "DP-10";
|
|
||||||
};
|
|
||||||
work_front_left = {
|
|
||||||
name = "LG Electronics LG Ultra HD 0x0007AB45";
|
|
||||||
mode = "3840x2160";
|
|
||||||
scale = "1";
|
|
||||||
position = "5120,0";
|
|
||||||
workspace = "1:一";
|
|
||||||
output = "DP-7";
|
|
||||||
};
|
|
||||||
work_back_right = {
|
|
||||||
name = "HP Inc. HP Z32 CN41212T55";
|
|
||||||
mode = "3840x2160";
|
|
||||||
scale = "1";
|
|
||||||
position = "5120,0";
|
|
||||||
workspace = "1:一";
|
|
||||||
output = "DP-3";
|
|
||||||
};
|
|
||||||
work_middle_middle_main = {
|
|
||||||
name = "HP Inc. HP 732pk CNC4080YL5";
|
|
||||||
mode = "3840x2160";
|
|
||||||
scale = "1";
|
|
||||||
position = "-1280,0";
|
|
||||||
workspace = "11:M";
|
|
||||||
output = "DP-8";
|
|
||||||
};
|
|
||||||
work_middle_middle_side = {
|
|
||||||
name = "Hewlett Packard HP Z24i CN44250RDT";
|
|
||||||
mode = "1920x1200";
|
|
||||||
transform = "270";
|
|
||||||
scale = "1";
|
|
||||||
position = "-2480,0";
|
|
||||||
workspace = "12:S";
|
|
||||||
output = "DP-9";
|
|
||||||
};
|
|
||||||
work_seminary = {
|
|
||||||
name = "Applied Creative Technology Transmitter QUATTRO201811";
|
|
||||||
mode = "1280x720";
|
|
||||||
scale = "1";
|
|
||||||
position = "10000,10000"; # i.e. this screen is inaccessible by moving the mouse
|
|
||||||
workspace = "14:T";
|
|
||||||
output = "DP-4";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
inputs = {
|
|
||||||
"12972:18:Framework_Laptop_16_Keyboard_Module_-_ANSI_Keyboard" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
"1133:45081:MX_Master_2S_Keyboard" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
"2362:628:PIXA3854:00_093A:0274_Touchpad" = {
|
|
||||||
dwt = "enabled";
|
|
||||||
tap = "enabled";
|
|
||||||
natural_scroll = "enabled";
|
|
||||||
middle_emulation = "enabled";
|
|
||||||
drag_lock = "disabled";
|
|
||||||
};
|
|
||||||
"1133:50504:Logitech_USB_Receiver" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
"1133:45944:MX_KEYS_S" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
keybindings = {
|
|
||||||
"Mod4+Ctrl+Shift+p" = "exec screenshare";
|
|
||||||
};
|
|
||||||
shellAliases = {
|
|
||||||
ans2-15_3-9 = ". ~/.venvs/ansible39_2_15_0/bin/activate";
|
|
||||||
ans3-9 = ". ~/.venvs/ansible39/bin/activate";
|
|
||||||
ans = ". ~/.venvs/ansible/bin/activate";
|
|
||||||
ans2-15 = ". ~/.venvs/ansible2.15.0/bin/activate";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
sharedOptions;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,13 @@
|
||||||
{ self, inputs, lib, primaryUser, ... }:
|
{ lib, primaryUser, ... }:
|
||||||
let
|
let
|
||||||
profilesPath = "${self}/profiles";
|
sharedOptions = {
|
||||||
|
isBtrfs = false;
|
||||||
|
isLinux = true;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
|
||||||
"${profilesPath}/nixos/server"
|
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.users."${primaryUser}".imports = [
|
|
||||||
"${profilesPath}/home/server"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
|
|
@ -48,7 +42,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# system.stateVersion = "23.11"; # TEMPLATE - but probably no need to change
|
system.stateVersion = "23.11"; # TEMPLATE - but probably no need to change
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
nginx = {
|
nginx = {
|
||||||
|
|
@ -77,19 +71,23 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
swarselsystems = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
flakePath = "/root/.dotfiles";
|
||||||
|
isImpermanence = false;
|
||||||
|
isSecureBoot = false;
|
||||||
|
isCrypted = false;
|
||||||
|
profiles = {
|
||||||
|
server.sync = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
sharedOptions;
|
||||||
|
|
||||||
swarselsystems = {
|
home-manager.users."${primaryUser}" = {
|
||||||
hasBluetooth = false;
|
home.stateVersion = lib.mkForce "23.05";
|
||||||
hasFingerprint = false;
|
swarselsystems = lib.recursiveUpdate
|
||||||
isImpermanence = false;
|
{ }
|
||||||
isLinux = true;
|
sharedOptions;
|
||||||
isBtrfs = false;
|
|
||||||
flakePath = "/root/.dotfiles";
|
|
||||||
server = {
|
|
||||||
enable = true;
|
|
||||||
forgejo = true;
|
|
||||||
ankisync = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,33 @@
|
||||||
{ self, inputs, outputs, pkgs, lib, primaryUser, ... }:
|
{ self, inputs, pkgs, lib, primaryUser, ... }:
|
||||||
let
|
let
|
||||||
profilesPath = "${self}/profiles";
|
modulesPath = "${self}/modules";
|
||||||
sharedOptions = {
|
sharedOptions = {
|
||||||
isBtrfs = true;
|
isBtrfs = true;
|
||||||
isLinux = true;
|
isLinux = true;
|
||||||
|
profiles = {
|
||||||
|
toto = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
"${self}/hosts/nixos/toto/disk-config.nix"
|
./disk-config.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
"${profilesPath}/nixos/optional/autologin.nix"
|
"${modulesPath}/nixos/common/sharedsetup.nix"
|
||||||
"${profilesPath}/nixos/common/settings.nix"
|
"${modulesPath}/home/common/sharedsetup.nix"
|
||||||
"${profilesPath}/nixos/common/home-manager.nix"
|
"${self}/profiles/nixos"
|
||||||
"${profilesPath}/nixos/common/home-manager-extra.nix"
|
|
||||||
"${profilesPath}/nixos/common/xserver.nix"
|
|
||||||
"${profilesPath}/nixos/common/users.nix"
|
|
||||||
"${profilesPath}/nixos/common/impermanence.nix"
|
|
||||||
"${profilesPath}/nixos/common/lanzaboote.nix"
|
|
||||||
"${profilesPath}/nixos/common/sops.nix"
|
|
||||||
"${profilesPath}/nixos/server/ssh.nix"
|
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users."${primaryUser}".imports = [
|
home-manager.users."${primaryUser}".imports = [
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
"${profilesPath}/home/common/settings.nix"
|
"${modulesPath}/home/common/sharedsetup.nix"
|
||||||
"${profilesPath}/home/common/sops.nix"
|
"${self}/profiles/home"
|
||||||
"${profilesPath}/home/common/ssh.nix"
|
];
|
||||||
] ++ (builtins.attrValues outputs.homeModules);
|
|
||||||
}
|
}
|
||||||
] ++ (builtins.attrValues outputs.nixosModules) ++ (builtins.attrValues outputs.homeModules);
|
];
|
||||||
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
@ -73,11 +68,13 @@ in
|
||||||
}
|
}
|
||||||
sharedOptions;
|
sharedOptions;
|
||||||
|
|
||||||
home-manager.users."${primaryUser}".swarselsystems = lib.recursiveUpdate
|
home-manager.users."${primaryUser}" = {
|
||||||
{
|
home.stateVersion = lib.mkForce "23.05";
|
||||||
isLaptop = false;
|
swarselsystems = lib.recursiveUpdate
|
||||||
isNixos = true;
|
{
|
||||||
}
|
isLaptop = false;
|
||||||
sharedOptions;
|
isNixos = true;
|
||||||
|
}
|
||||||
|
sharedOptions;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,17 @@
|
||||||
{ self, inputs, primaryUser, ... }:
|
{ lib, primaryUser, ... }:
|
||||||
let
|
let
|
||||||
profilesPath = "${self}/profiles";
|
sharedOptions = {
|
||||||
|
isBtrfs = false;
|
||||||
|
isLinux = true;
|
||||||
|
profiles = {
|
||||||
|
server.local = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
"${profilesPath}/nixos/optional/autologin.nix"
|
|
||||||
"${profilesPath}/nixos/server"
|
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.users."${primaryUser}".imports = [
|
|
||||||
"${profilesPath}/home/server"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
|
@ -31,28 +27,19 @@ in
|
||||||
firewall.allowedTCPPorts = [ 80 443 ];
|
firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
swarselsystems = {
|
|
||||||
hasBluetooth = false;
|
|
||||||
hasFingerprint = false;
|
|
||||||
isImpermanence = false;
|
|
||||||
isBtrfs = false;
|
|
||||||
isLinux = true;
|
|
||||||
server = {
|
|
||||||
enable = true;
|
|
||||||
kavita = true;
|
|
||||||
navidrome = true;
|
|
||||||
jellyfin = true;
|
|
||||||
spotifyd = true;
|
|
||||||
mpd = false;
|
|
||||||
matrix = true;
|
|
||||||
nextcloud = true;
|
|
||||||
immich = true;
|
|
||||||
paperless = true;
|
|
||||||
transmission = true;
|
|
||||||
syncthing = true;
|
|
||||||
monitoring = true;
|
|
||||||
freshrss = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
swarselsystems = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
isImpermanence = false;
|
||||||
|
isSecureBoot = true;
|
||||||
|
isCrypted = true;
|
||||||
|
}
|
||||||
|
sharedOptions;
|
||||||
|
|
||||||
|
home-manager.users."${primaryUser}" = {
|
||||||
|
home.stateVersion = lib.mkForce "23.05";
|
||||||
|
swarselsystems = lib.recursiveUpdate
|
||||||
|
{ }
|
||||||
|
sharedOptions;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,13 @@ in
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
mkTrueOption = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
mkStrong = lib.mkOverride 60;
|
||||||
|
|
||||||
getSecret = filename: lib.strings.trim (builtins.readFile "${filename}");
|
getSecret = filename: lib.strings.trim (builtins.readFile "${filename}");
|
||||||
|
|
||||||
forEachSystem = f: lib.genAttrs (import systems) (system: f lib.swarselsystems.pkgsFor.${system});
|
forEachSystem = f: lib.genAttrs (import systems) (system: f lib.swarselsystems.pkgsFor.${system});
|
||||||
|
|
@ -43,46 +50,50 @@ in
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
|
inputs.fw-fanctrl.nixosModules.default
|
||||||
"${self}/hosts/${type}/${host}"
|
"${self}/hosts/${type}/${host}"
|
||||||
{
|
{
|
||||||
_module.args.primaryUser = linuxUser;
|
_module.args.primaryUser = linuxUser;
|
||||||
}
|
}
|
||||||
] ++
|
] ++
|
||||||
(if (host == "toto" || host == "iso") then [ ] else
|
(if (host == "iso") then [ ] else
|
||||||
([
|
([
|
||||||
# put nixos imports here that are for all servers and normal hosts
|
# put nixos imports here that are for all servers and normal hosts
|
||||||
inputs.nix-topology.nixosModules.default
|
inputs.nix-topology.nixosModules.default
|
||||||
] ++
|
"${self}/modules/${type}/common"
|
||||||
(if (host == "winters" || host == "sync") then [ ] else [
|
|
||||||
# put nixos imports here that are for all normal hosts
|
|
||||||
"${self}/profiles/${type}/common"
|
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
|
inputs.nswitch-rcm-nix.nixosModules.nswitch-rcm
|
||||||
]) ++ (if (type == "nixos") then [
|
] ++ (if (type == "nixos") then [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
"${self}/profiles/nixos"
|
||||||
|
"${self}/modules/nixos/server"
|
||||||
|
"${self}/modules/nixos/optional"
|
||||||
{
|
{
|
||||||
home-manager.users."${linuxUser}".imports = (
|
home-manager.users."${linuxUser}".imports = [
|
||||||
if (host == "winters" || host == "sync") then [ ] else [
|
# put home-manager imports here that are for all normal hosts
|
||||||
# put home-manager imports here that are for all normal hosts
|
|
||||||
"${self}/profiles/home/common"
|
|
||||||
]
|
|
||||||
) ++ [
|
|
||||||
# put home-manager imports here that are for all servers and normal hosts
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
inputs.nix-index-database.hmModules.nix-index
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
] ++ (builtins.attrValues outputs.homeModules);
|
"${self}/modules/home/common"
|
||||||
|
"${self}/modules/home/server"
|
||||||
|
"${self}/modules/home/optional"
|
||||||
|
"${self}/profiles/home"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
] else [
|
] else [
|
||||||
# put nixos imports here that are for darwin hosts
|
# put nixos imports here that are for darwin hosts
|
||||||
"${self}/profiles/darwin/nixos/common"
|
"${self}/modules/darwin/nixos/common"
|
||||||
|
"${self}/profiles/darwin"
|
||||||
inputs.home-manager.darwinModules.home-manager
|
inputs.home-manager.darwinModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.users."${macUser}".imports = [
|
home-manager.users."${macUser}".imports = [
|
||||||
# put home-manager imports here that are for darwin hosts
|
# put home-manager imports here that are for darwin hosts
|
||||||
"${self}/profiles/darwin/home"
|
"${self}/modules/darwin/home"
|
||||||
] ++ (builtins.attrValues outputs.homeModules);
|
"${self}/modules/home/server"
|
||||||
|
"${self}/modules/home/optional"
|
||||||
|
"${self}/profiles/home"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
]) ++ (builtins.attrValues outputs.nixosModules) ++ (builtins.attrValues outputs.homeModules)
|
])
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -113,6 +124,9 @@ in
|
||||||
value = {
|
value = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = "${self.packages.${system}.${name}}/bin/${name}";
|
program = "${self.packages.${system}.${name}}/bin/${name}";
|
||||||
|
meta = {
|
||||||
|
description = "Custom app ${name}.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
names);
|
names);
|
||||||
|
|
@ -132,6 +146,13 @@ in
|
||||||
})
|
})
|
||||||
names);
|
names);
|
||||||
|
|
||||||
|
mkProfiles = names: type: builtins.listToAttrs (map
|
||||||
|
(name: {
|
||||||
|
inherit name;
|
||||||
|
value = import "${self}/profiles/${type}/${name}";
|
||||||
|
})
|
||||||
|
names);
|
||||||
|
|
||||||
mkTemplates = names: builtins.listToAttrs (map
|
mkTemplates = names: builtins.listToAttrs (map
|
||||||
(name: {
|
(name: {
|
||||||
inherit name;
|
inherit name;
|
||||||
|
|
|
||||||
10
modules/darwin/home/default.nix
Normal file
10
modules/darwin/home/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ self, ... }:
|
||||||
|
let
|
||||||
|
modulesPath = "${self}/modules";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
"${modulesPath}/home/common/settings.nix"
|
||||||
|
"${modulesPath}/home/common/sharedsetup.nix"
|
||||||
|
];
|
||||||
|
}
|
||||||
34
modules/home/common/custom-packages.nix
Normal file
34
modules/home/common/custom-packages.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.ownpackages = lib.mkEnableOption "own packages settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.ownpackages {
|
||||||
|
home.packages = with pkgs; lib.mkIf (!config.swarselsystems.isPublic) [
|
||||||
|
pass-fuzzel
|
||||||
|
cura5
|
||||||
|
cdw
|
||||||
|
cdb
|
||||||
|
bak
|
||||||
|
timer
|
||||||
|
e
|
||||||
|
swarselcheck
|
||||||
|
waybarupdate
|
||||||
|
opacitytoggle
|
||||||
|
fs-diff
|
||||||
|
github-notifications
|
||||||
|
hm-specialisation
|
||||||
|
t2ts
|
||||||
|
ts2t
|
||||||
|
vershell
|
||||||
|
eontimer
|
||||||
|
project
|
||||||
|
fhs
|
||||||
|
swarsel-bootstrap
|
||||||
|
swarsel-displaypower
|
||||||
|
swarselzellij
|
||||||
|
sshrm
|
||||||
|
|
||||||
|
rustdesk-vbc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/home/common/default.nix
Normal file
7
modules/home/common/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
importNames = lib.swarselsystems.readNix "modules/home/common";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = lib.swarselsystems.mkImports importNames "modules/home/common";
|
||||||
|
}
|
||||||
95
modules/home/common/desktop.nix
Normal file
95
modules/home/common/desktop.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.desktop = lib.mkEnableOption "desktop settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.desktop {
|
||||||
|
xdg.desktopEntries = {
|
||||||
|
|
||||||
|
cura = {
|
||||||
|
name = "Ultimaker Cura";
|
||||||
|
genericName = "Cura";
|
||||||
|
exec = "cura";
|
||||||
|
terminal = false;
|
||||||
|
categories = [ "Application" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
rustdesk-vbc = {
|
||||||
|
name = "Rustdesk VBC";
|
||||||
|
genericName = "rustdesk-vbc";
|
||||||
|
exec = "rustdesk-vbc";
|
||||||
|
terminal = false;
|
||||||
|
categories = [ "Application" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
anki = {
|
||||||
|
name = "Anki Flashcards";
|
||||||
|
genericName = "Anki";
|
||||||
|
exec = "anki";
|
||||||
|
terminal = false;
|
||||||
|
categories = [ "Application" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
element = {
|
||||||
|
name = "Element Matrix Client";
|
||||||
|
genericName = "Element";
|
||||||
|
exec = "element-desktop -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";
|
||||||
|
terminal = false;
|
||||||
|
categories = [ "Application" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
emacsclient-newframe = {
|
||||||
|
name = "Emacs (Client, New Frame)";
|
||||||
|
genericName = "Emacs (Client, New Frame)";
|
||||||
|
exec = "emacsclient -r %u";
|
||||||
|
icon = "emacs";
|
||||||
|
terminal = false;
|
||||||
|
categories = [ "Development" "TextEditor" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.mimeApps = {
|
||||||
|
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = {
|
||||||
|
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||||
|
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||||
|
"x-scheme-handler/chrome" = [ "firefox.desktop" ];
|
||||||
|
"text/plain" = [ "emacsclient.desktop" ];
|
||||||
|
"text/csv" = [ "emacsclient.desktop" ];
|
||||||
|
"text/html" = [ "firefox.desktop" ];
|
||||||
|
"application/x-extension-htm" = [ "firefox.desktop" ];
|
||||||
|
"application/x-extension-html" = [ "firefox.desktop" ];
|
||||||
|
"application/x-extension-shtml" = [ "firefox.desktop" ];
|
||||||
|
"application/xhtml+xml" = [ "firefox.desktop" ];
|
||||||
|
"application/x-extension-xhtml" = [ "firefox.desktop" ];
|
||||||
|
"application/x-extension-xht" = [ "firefox.desktop" ];
|
||||||
|
"image/png" = [ "imv.desktop" ];
|
||||||
|
"image/jpeg" = [ "imv.desktop" ];
|
||||||
|
"image/gif" = [ "imv.desktop" ];
|
||||||
|
"image/svg" = [ "imv.desktop" ];
|
||||||
|
"image/webp" = [ "firefox.desktop" ];
|
||||||
|
"image/vnd.adobe.photoshop" = [ "gimp.desktop" ];
|
||||||
|
"image/vnd.dxf" = [ "org.inkscape.Inkscape.desktop" ];
|
||||||
|
"audio/flac" = [ "mpv.desktop" ];
|
||||||
|
"audio/mp3" = [ "mpv.desktop" ];
|
||||||
|
"audio/ogg" = [ "mpv.desktop" ];
|
||||||
|
"audio/wav" = [ "mpv.desktop" ];
|
||||||
|
"video/mp4" = [ "umpv.desktop" ];
|
||||||
|
"video/mkv" = [ "umpv.desktop" ];
|
||||||
|
"video/flv" = [ "umpv.desktop" ];
|
||||||
|
"video/3gp" = [ "umpv.desktop" ];
|
||||||
|
"application/pdf" = [ "org.gnome.Evince.desktop" ];
|
||||||
|
"application/metalink+xml" = [ "emacsclient.desktop" ];
|
||||||
|
"application/sql" = [ "emacsclient.desktop" ];
|
||||||
|
"application/vnd.ms-powerpoint" = [ "impress.desktop" ];
|
||||||
|
"application/msword" = [ "writer.desktop" ];
|
||||||
|
"application/vnd.ms-excel" = [ "calc.desktop" ];
|
||||||
|
};
|
||||||
|
associations = {
|
||||||
|
added = {
|
||||||
|
"application/x-zerosize" = [ "emacsclient.desktop" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/home/common/direnv.nix
Normal file
11
modules/home/common/direnv.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.direnv = lib.mkEnableOption "direnv settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.direnv {
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
silent = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
79
modules/home/common/emacs.nix
Normal file
79
modules/home/common/emacs.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
{ self, lib, config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.swarselsystems) homeDir isPublic;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.emacs = lib.mkEnableOption "emacs settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.emacs {
|
||||||
|
# needed for elfeed
|
||||||
|
sops.secrets.fever = lib.mkIf (!isPublic) { path = "${homeDir}/.emacs.d/.fever"; };
|
||||||
|
|
||||||
|
# enable emacs overlay for bleeding edge features
|
||||||
|
# also read init.el file and install use-package packages
|
||||||
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.emacsWithPackagesFromUsePackage {
|
||||||
|
config = self + /programs/emacs/init.el;
|
||||||
|
package = pkgs.emacs-git-pgtk;
|
||||||
|
alwaysEnsure = true;
|
||||||
|
alwaysTangle = true;
|
||||||
|
extraEmacsPackages = epkgs: [
|
||||||
|
epkgs.mu4e
|
||||||
|
epkgs.use-package
|
||||||
|
epkgs.lsp-bridge
|
||||||
|
epkgs.doom-themes
|
||||||
|
epkgs.vterm
|
||||||
|
epkgs.treesit-grammars.with-all-grammars
|
||||||
|
|
||||||
|
# build the rest of the packages myself
|
||||||
|
# org-calfw is severely outdated on MELPA and throws many warnings on emacs startup
|
||||||
|
# build the package from the haji-ali fork, which is well-maintained
|
||||||
|
|
||||||
|
(epkgs.trivialBuild rec {
|
||||||
|
pname = "eglot-booster";
|
||||||
|
version = "main-29-10-2024";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "jdtsmith";
|
||||||
|
repo = "eglot-booster";
|
||||||
|
rev = "e6daa6bcaf4aceee29c8a5a949b43eb1b89900ed";
|
||||||
|
hash = "sha256-PLfaXELkdX5NZcSmR1s/kgmU16ODF8bn56nfTh9g6bs=";
|
||||||
|
};
|
||||||
|
|
||||||
|
packageRequires = [ epkgs.jsonrpc epkgs.eglot ];
|
||||||
|
})
|
||||||
|
(epkgs.trivialBuild rec {
|
||||||
|
pname = "calfw";
|
||||||
|
version = "1.0.0-20231002";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "haji-ali";
|
||||||
|
repo = "emacs-calfw";
|
||||||
|
rev = "bc99afee611690f85f0cd0bd33300f3385ddd3d3";
|
||||||
|
hash = "sha256-0xMII1KJhTBgQ57tXJks0ZFYMXIanrOl9XyqVmu7a7Y=";
|
||||||
|
};
|
||||||
|
packageRequires = [ epkgs.howm ];
|
||||||
|
})
|
||||||
|
|
||||||
|
(epkgs.trivialBuild rec {
|
||||||
|
pname = "fast-scroll";
|
||||||
|
version = "1.0.0-20191016";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "ahungry";
|
||||||
|
repo = "fast-scroll";
|
||||||
|
rev = "3f6ca0d5556fe9795b74714304564f2295dcfa24";
|
||||||
|
hash = "sha256-w1wmJW7YwXyjvXJOWdN2+k+QmhXr4IflES/c2bCX3CI=";
|
||||||
|
};
|
||||||
|
packageRequires = [ ];
|
||||||
|
})
|
||||||
|
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.emacs = {
|
||||||
|
enable = true;
|
||||||
|
socketActivation.enable = false;
|
||||||
|
startWithUserSession = "graphical";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
29
modules/home/common/env.nix
Normal file
29
modules/home/common/env.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ lib, config, nix-secrets, ... }:
|
||||||
|
let
|
||||||
|
secretsDirectory = builtins.toString nix-secrets;
|
||||||
|
leonMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/leon";
|
||||||
|
nautilusMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/nautilus";
|
||||||
|
mrswarselMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/mrswarsel";
|
||||||
|
swarselMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/swarsel";
|
||||||
|
fullName = lib.swarselsystems.getSecret "${secretsDirectory}/info/fullname";
|
||||||
|
allMailAddresses = lib.swarselsystems.getSecret "${secretsDirectory}/mail/list";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.env = lib.mkEnableOption "env settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.env {
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "e -w";
|
||||||
|
DISPLAY = ":0";
|
||||||
|
SWARSEL_LO_RES = config.swarselsystems.lowResolution;
|
||||||
|
SWARSEL_HI_RES = config.swarselsystems.highResolution;
|
||||||
|
};
|
||||||
|
systemd.user.sessionVariables = {
|
||||||
|
SWARSEL_LEON_MAIL = leonMail;
|
||||||
|
SWARSEL_NAUTILUS_MAIL = nautilusMail;
|
||||||
|
SWARSEL_MRSWARSEL_MAIL = mrswarselMail;
|
||||||
|
SWARSEL_SWARSEL_MAIL = swarselMail;
|
||||||
|
SWARSEL_FULLNAME = fullName;
|
||||||
|
SWARSEL_MAIL_ALL = allMailAddresses;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
15
modules/home/common/eza.nix
Normal file
15
modules/home/common/eza.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.eza = lib.mkEnableOption "eza settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.eza {
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
icons = "auto";
|
||||||
|
git = true;
|
||||||
|
extraOptions = [
|
||||||
|
"-l"
|
||||||
|
"--group-directories-first"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
150
modules/home/common/firefox.nix
Normal file
150
modules/home/common/firefox.nix
Normal file
|
|
@ -0,0 +1,150 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.firefox = lib.mkEnableOption "firefox settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.firefox {
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.firefox; # uses overrides
|
||||||
|
policies = {
|
||||||
|
# CaptivePortal = false;
|
||||||
|
AppAutoUpdate = false;
|
||||||
|
BackgroundAppUpdate = false;
|
||||||
|
DisableBuiltinPDFViewer = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisableFirefoxAccounts = false;
|
||||||
|
DisableProfileImport = true;
|
||||||
|
DisableProfileRefresh = true;
|
||||||
|
DisplayBookmarksToolbar = "always";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
NoDefaultBookmarks = true;
|
||||||
|
OfferToSaveLogins = false;
|
||||||
|
OfferToSaveLoginsDefault = false;
|
||||||
|
PasswordManagerEnabled = false;
|
||||||
|
DisableMasterPasswordCreation = true;
|
||||||
|
ExtensionUpdate = false;
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
EmailTracking = true;
|
||||||
|
# Exceptions = ["https://example.com"]
|
||||||
|
};
|
||||||
|
PDFjs = {
|
||||||
|
Enabled = false;
|
||||||
|
EnablePermissions = false;
|
||||||
|
};
|
||||||
|
Handlers = {
|
||||||
|
mimeTypes."application/pdf".action = "saveToDisk";
|
||||||
|
};
|
||||||
|
extensions = {
|
||||||
|
pdf = {
|
||||||
|
action = "useHelperApp";
|
||||||
|
ask = true;
|
||||||
|
handlers = [
|
||||||
|
{
|
||||||
|
name = "GNOME Document Viewer";
|
||||||
|
path = "${pkgs.evince}/bin/evince";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
FirefoxHome = {
|
||||||
|
Search = true;
|
||||||
|
TopSites = true;
|
||||||
|
SponsoredTopSites = false;
|
||||||
|
Highlights = true;
|
||||||
|
Pocket = false;
|
||||||
|
SponsoredPocket = false;
|
||||||
|
Snippets = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
FirefoxSuggest = {
|
||||||
|
WebSuggestions = false;
|
||||||
|
SponsoredSuggestions = false;
|
||||||
|
ImproveSuggest = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
SanitizeOnShutdown = {
|
||||||
|
Cache = true;
|
||||||
|
Cookies = false;
|
||||||
|
Downloads = true;
|
||||||
|
FormData = true;
|
||||||
|
History = false;
|
||||||
|
Sessions = false;
|
||||||
|
SiteSettings = false;
|
||||||
|
OfflineApps = true;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
SearchEngines = {
|
||||||
|
PreventInstalls = true;
|
||||||
|
Remove = [
|
||||||
|
"Bing" # Fuck you
|
||||||
|
];
|
||||||
|
};
|
||||||
|
UserMessaging = {
|
||||||
|
ExtensionRecommendations = false; # Don’t recommend extensions while the user is visiting web pages
|
||||||
|
FeatureRecommendations = false; # Don’t recommend browser features
|
||||||
|
Locked = true; # Prevent the user from changing user messaging preferences
|
||||||
|
MoreFromMozilla = false; # Don’t show the “More from Mozilla” section in Preferences
|
||||||
|
SkipOnboarding = true; # Don’t show onboarding messages on the new tab page
|
||||||
|
UrlbarInterventions = false; # Don’t offer suggestions in the URL bar
|
||||||
|
WhatsNew = false; # Remove the “What’s New” icon and menuitem
|
||||||
|
};
|
||||||
|
ExtensionSettings = {
|
||||||
|
"3rdparty".Extensions = {
|
||||||
|
# https://github.com/gorhill/uBlock/blob/master/platform/common/managed_storage.json
|
||||||
|
"uBlock0@raymondhill.net".adminSettings = {
|
||||||
|
userSettings = rec {
|
||||||
|
uiTheme = "dark";
|
||||||
|
uiAccentCustom = true;
|
||||||
|
uiAccentCustom0 = "#0C8084";
|
||||||
|
cloudStorageEnabled = lib.mkForce false;
|
||||||
|
importedLists = [
|
||||||
|
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||||
|
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||||
|
];
|
||||||
|
externalLists = lib.concatStringsSep "\n" importedLists;
|
||||||
|
};
|
||||||
|
selectedFilterLists = [
|
||||||
|
"CZE-0"
|
||||||
|
"adguard-generic"
|
||||||
|
"adguard-annoyance"
|
||||||
|
"adguard-social"
|
||||||
|
"adguard-spyware-url"
|
||||||
|
"easylist"
|
||||||
|
"easyprivacy"
|
||||||
|
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||||
|
"plowe-0"
|
||||||
|
"ublock-abuse"
|
||||||
|
"ublock-badware"
|
||||||
|
"ublock-filters"
|
||||||
|
"ublock-privacy"
|
||||||
|
"ublock-quick-fixes"
|
||||||
|
"ublock-unbreak"
|
||||||
|
"urlhaus-1"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
profiles = {
|
||||||
|
default = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
id = 0;
|
||||||
|
isDefault = true;
|
||||||
|
settings = {
|
||||||
|
"browser.startup.homepage" = "https://lobste.rs";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
config.swarselsystems.firefox;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
modules/home/common/fuzzel.nix
Normal file
17
modules/home/common/fuzzel.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.fuzzel = lib.mkEnableOption "fuzzel settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.fuzzel {
|
||||||
|
programs.fuzzel = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
layer = "overlay";
|
||||||
|
lines = "10";
|
||||||
|
width = "40";
|
||||||
|
};
|
||||||
|
border.radius = "0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
15
modules/home/common/gammastep.nix
Normal file
15
modules/home/common/gammastep.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ lib, config, nix-secrets, ... }:
|
||||||
|
let
|
||||||
|
secretsDirectory = builtins.toString nix-secrets;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.gammastep = lib.mkEnableOption "gammastep settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.gammastep {
|
||||||
|
services.gammastep = {
|
||||||
|
enable = true;
|
||||||
|
provider = "manual";
|
||||||
|
latitude = lib.swarselsystems.getSecret "${secretsDirectory}/home/gammastep-latitude";
|
||||||
|
longitude = lib.swarselsystems.getSecret "${secretsDirectory}/home/gammastep-longitude";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
47
modules/home/common/git.nix
Normal file
47
modules/home/common/git.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
{ lib, config, nix-secrets, ... }:
|
||||||
|
let
|
||||||
|
secretsDirectory = builtins.toString nix-secrets;
|
||||||
|
leonMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/leon";
|
||||||
|
fullName = lib.swarselsystems.getSecret "${secretsDirectory}/info/fullname";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.git = lib.mkEnableOption "git settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.git {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
aliases = {
|
||||||
|
a = "add";
|
||||||
|
c = "commit";
|
||||||
|
cl = "clone";
|
||||||
|
co = "checkout";
|
||||||
|
b = "branch";
|
||||||
|
i = "init";
|
||||||
|
m = "merge";
|
||||||
|
s = "status";
|
||||||
|
r = "restore";
|
||||||
|
p = "pull";
|
||||||
|
pp = "push";
|
||||||
|
};
|
||||||
|
signing = {
|
||||||
|
key = "0x76FD3810215AE097";
|
||||||
|
signByDefault = true;
|
||||||
|
};
|
||||||
|
userEmail = lib.mkDefault leonMail;
|
||||||
|
userName = fullName;
|
||||||
|
difftastic.enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
includes = [
|
||||||
|
{
|
||||||
|
contents = {
|
||||||
|
github = {
|
||||||
|
user = "Swarsel";
|
||||||
|
};
|
||||||
|
commit = {
|
||||||
|
template = "~/.gitmessage";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
9
modules/home/common/gnome-keyring.nix
Normal file
9
modules/home/common/gnome-keyring.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.gnome-keyring = lib.mkEnableOption "gnome keyring settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.gnome-keyring {
|
||||||
|
services.gnome-keyring = lib.mkIf (!config.swarselsystems.isNixos) {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
42
modules/home/common/gpg-agent.nix
Normal file
42
modules/home/common/gpg-agent.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{ self, lib, config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.swarselsystems) mainUser homeDir;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.gpgagent = lib.mkEnableOption "gpg agent settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.gpgagent {
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
enableScDaemon = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
enableExtraSocket = true;
|
||||||
|
pinentryPackage = pkgs.pinentry.gtk2;
|
||||||
|
defaultCacheTtl = 600;
|
||||||
|
maxCacheTtl = 7200;
|
||||||
|
extraConfig = ''
|
||||||
|
allow-loopback-pinentry
|
||||||
|
allow-emacs-pinentry
|
||||||
|
'';
|
||||||
|
sshKeys = [
|
||||||
|
"4BE7925262289B476DBBC17B76FD3810215AE097"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gpg = {
|
||||||
|
enable = true;
|
||||||
|
publicKeys = [
|
||||||
|
{
|
||||||
|
source = "${self}/secrets/keys/gpg/gpg-public-key-0x76FD3810215AE097.asc";
|
||||||
|
trust = 5;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# assure correct permissions
|
||||||
|
systemd.user.tmpfiles.rules = [
|
||||||
|
"d ${homeDir}/.gnupg 700 ${mainUser} users"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
88
modules/home/common/kanshi.nix
Normal file
88
modules/home/common/kanshi.nix
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.kanshi = lib.mkEnableOption "kanshi settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.kanshi {
|
||||||
|
swarselsystems = {
|
||||||
|
monitors = {
|
||||||
|
homedesktop = {
|
||||||
|
name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
|
||||||
|
mode = "2560x1440";
|
||||||
|
scale = "1";
|
||||||
|
position = "0,0";
|
||||||
|
workspace = "1:一";
|
||||||
|
output = "DP-11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.kanshi = {
|
||||||
|
enable = true;
|
||||||
|
settings = [
|
||||||
|
{
|
||||||
|
# laptop screen
|
||||||
|
output = {
|
||||||
|
criteria = config.swarselsystems.sharescreen;
|
||||||
|
mode = config.swarselsystems.highResolution;
|
||||||
|
scale = 1.0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# home main screen
|
||||||
|
output = {
|
||||||
|
criteria = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "2560x1440";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "lidopen";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = "eDP-2";
|
||||||
|
status = "enable";
|
||||||
|
scale = 1.0;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "lidopen";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = config.swarselsystems.sharescreen;
|
||||||
|
status = "enable";
|
||||||
|
scale = 1.7;
|
||||||
|
position = "2560,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "2560x1440";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "lidclosed";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = config.swarselsystems.sharescreen;
|
||||||
|
status = "disable";
|
||||||
|
position = "2560,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "2560x1440";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/home/common/kdeconnect.nix
Normal file
11
modules/home/common/kdeconnect.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.kdeconnect = lib.mkEnableOption "kdeconnect settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.kdeconnect {
|
||||||
|
services.kdeconnect = {
|
||||||
|
enable = true;
|
||||||
|
indicator = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
15
modules/home/common/kitty.nix
Normal file
15
modules/home/common/kitty.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.kitty = lib.mkEnableOption "kitty settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.kitty {
|
||||||
|
programs.kitty = {
|
||||||
|
enable = true;
|
||||||
|
keybindings = { };
|
||||||
|
settings = {
|
||||||
|
scrollback_lines = 10000;
|
||||||
|
enable_audio_bell = false;
|
||||||
|
notify_on_cmd_finish = "always 20";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
148
modules/home/common/mail.nix
Normal file
148
modules/home/common/mail.nix
Normal file
|
|
@ -0,0 +1,148 @@
|
||||||
|
{ lib, config, nix-secrets, ... }:
|
||||||
|
let
|
||||||
|
secretsDirectory = builtins.toString nix-secrets;
|
||||||
|
leonMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/leon";
|
||||||
|
nautilusMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/nautilus";
|
||||||
|
mrswarselMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/mrswarsel";
|
||||||
|
swarselMail = lib.swarselsystems.getSecret "${secretsDirectory}/mail/swarsel";
|
||||||
|
fullName = lib.swarselsystems.getSecret "${secretsDirectory}/info/fullname";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.mail = lib.mkEnableOption "mail settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.mail {
|
||||||
|
programs = {
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
msmtp = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
mu = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.mbsync = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
# this is needed so that mbsync can use the passwords from sops
|
||||||
|
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
||||||
|
|
||||||
|
accounts = lib.mkIf (!config.swarselsystems.isPublic) {
|
||||||
|
email = {
|
||||||
|
maildirBasePath = "Mail";
|
||||||
|
accounts = {
|
||||||
|
leon = {
|
||||||
|
primary = true;
|
||||||
|
address = leonMail;
|
||||||
|
userName = leonMail;
|
||||||
|
realName = fullName;
|
||||||
|
passwordCommand = "cat ${config.sops.secrets.leon.path}";
|
||||||
|
gpg = {
|
||||||
|
key = "0x76FD3810215AE097";
|
||||||
|
signByDefault = true;
|
||||||
|
};
|
||||||
|
imap.host = "imap.gmail.com";
|
||||||
|
smtp.host = "smtp.gmail.com";
|
||||||
|
mu.enable = true;
|
||||||
|
msmtp = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "maildir";
|
||||||
|
expunge = "both";
|
||||||
|
patterns = [ "*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" ];
|
||||||
|
extraConfig = {
|
||||||
|
channel = {
|
||||||
|
Sync = "All";
|
||||||
|
};
|
||||||
|
account = {
|
||||||
|
Timeout = 120;
|
||||||
|
PipelineDepth = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swarsel = {
|
||||||
|
address = swarselMail;
|
||||||
|
userName = "8227dc594dd515ce232eda1471cb9a19";
|
||||||
|
realName = fullName;
|
||||||
|
passwordCommand = "cat ${config.sops.secrets.swarselmail.path}";
|
||||||
|
smtp = {
|
||||||
|
host = "in-v3.mailjet.com";
|
||||||
|
port = 587;
|
||||||
|
tls = {
|
||||||
|
enable = true;
|
||||||
|
useStartTls = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mu.enable = false;
|
||||||
|
msmtp = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nautilus = {
|
||||||
|
primary = false;
|
||||||
|
address = nautilusMail;
|
||||||
|
userName = nautilusMail;
|
||||||
|
realName = "Nautilus";
|
||||||
|
passwordCommand = "cat ${config.sops.secrets.nautilus.path}";
|
||||||
|
imap.host = "imap.gmail.com";
|
||||||
|
smtp.host = "smtp.gmail.com";
|
||||||
|
msmtp.enable = true;
|
||||||
|
mu.enable = true;
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "maildir";
|
||||||
|
expunge = "both";
|
||||||
|
patterns = [ "*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" ];
|
||||||
|
extraConfig = {
|
||||||
|
channel = {
|
||||||
|
Sync = "All";
|
||||||
|
};
|
||||||
|
account = {
|
||||||
|
Timeout = 120;
|
||||||
|
PipelineDepth = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mrswarsel = {
|
||||||
|
primary = false;
|
||||||
|
address = mrswarselMail;
|
||||||
|
userName = mrswarselMail;
|
||||||
|
realName = "Swarsel";
|
||||||
|
passwordCommand = "cat ${config.sops.secrets.mrswarsel.path}";
|
||||||
|
imap.host = "imap.gmail.com";
|
||||||
|
smtp.host = "smtp.gmail.com";
|
||||||
|
msmtp.enable = true;
|
||||||
|
mu.enable = true;
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "maildir";
|
||||||
|
expunge = "both";
|
||||||
|
patterns = [ "*" "![Gmail]*" "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail" ];
|
||||||
|
extraConfig = {
|
||||||
|
channel = {
|
||||||
|
Sync = "All";
|
||||||
|
};
|
||||||
|
account = {
|
||||||
|
Timeout = 120;
|
||||||
|
PipelineDepth = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
35
modules/home/common/mako.nix
Normal file
35
modules/home/common/mako.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.mako = lib.mkEnableOption "mako settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.mako {
|
||||||
|
services.mako = {
|
||||||
|
enable = true;
|
||||||
|
# backgroundColor = "#2e3440";
|
||||||
|
# borderColor = "#88c0d0";
|
||||||
|
borderRadius = 15;
|
||||||
|
borderSize = 1;
|
||||||
|
defaultTimeout = 5000;
|
||||||
|
height = 150;
|
||||||
|
icons = true;
|
||||||
|
ignoreTimeout = true;
|
||||||
|
layer = "overlay";
|
||||||
|
maxIconSize = 64;
|
||||||
|
sort = "-time";
|
||||||
|
width = 300;
|
||||||
|
# font = "monospace 10";
|
||||||
|
extraConfig = ''
|
||||||
|
[urgency=low]
|
||||||
|
border-color=#cccccc
|
||||||
|
[urgency=normal]
|
||||||
|
border-color=#d08770
|
||||||
|
[urgency=high]
|
||||||
|
border-color=#bf616a
|
||||||
|
default-timeout=3000
|
||||||
|
[category=mpd]
|
||||||
|
default-timeout=2000
|
||||||
|
group-by=category
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
24
modules/home/common/nix-index.nix
Normal file
24
modules/home/common/nix-index.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{ self, lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.nix-index = lib.mkEnableOption "nix-index settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.nix-index {
|
||||||
|
programs.nix-index =
|
||||||
|
let
|
||||||
|
commandNotFound = pkgs.runCommandLocal "command-not-found.sh" { } ''
|
||||||
|
mkdir -p $out/etc/profile.d
|
||||||
|
substitute ${self + /scripts/command-not-found.sh} \
|
||||||
|
$out/etc/profile.d/command-not-found.sh \
|
||||||
|
--replace-fail @nix-locate@ ${pkgs.nix-index}/bin/nix-locate \
|
||||||
|
--replace-fail @tput@ ${pkgs.ncurses}/bin/tput
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.symlinkJoin {
|
||||||
|
name = "nix-index";
|
||||||
|
paths = [ commandNotFound ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
modules/home/common/nixgl.nix
Normal file
27
modules/home/common/nixgl.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ lib, config, nixgl, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems = {
|
||||||
|
modules.nixgl = lib.mkEnableOption "nixgl settings";
|
||||||
|
isSecondaryGpu = lib.mkEnableOption "device has a secondary GPU";
|
||||||
|
SecondaryGpuCard = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.nixgl {
|
||||||
|
nixGL = lib.mkIf (!config.swarselsystems.isNixos) {
|
||||||
|
inherit (nixgl) packages;
|
||||||
|
defaultWrapper = lib.mkDefault "mesa";
|
||||||
|
vulkan.enable = lib.mkDefault false;
|
||||||
|
prime = lib.mkIf config.swarselsystem.isSecondaryGpu {
|
||||||
|
card = config.swarselsystem.secondaryGpuCard;
|
||||||
|
installScript = "mesa";
|
||||||
|
};
|
||||||
|
offloadWrapper = lib.mkIf config.swarselsystem.isSecondaryGpu "mesaPrime";
|
||||||
|
installScripts = [
|
||||||
|
"mesa"
|
||||||
|
"mesaPrime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
183
modules/home/common/packages.nix
Normal file
183
modules/home/common/packages.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.packages = lib.mkEnableOption "packages settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.packages {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
|
||||||
|
# audio stuff
|
||||||
|
spek # spectrum analyzer
|
||||||
|
losslessaudiochecker
|
||||||
|
ffmpeg_7-full
|
||||||
|
flac
|
||||||
|
mediainfo
|
||||||
|
picard-tools
|
||||||
|
audacity
|
||||||
|
sox
|
||||||
|
stable.feishin
|
||||||
|
calibre
|
||||||
|
|
||||||
|
# printing
|
||||||
|
cups
|
||||||
|
simple-scan
|
||||||
|
|
||||||
|
# dict
|
||||||
|
(aspellWithDicts (dicts: with dicts; [ de en en-computers en-science ]))
|
||||||
|
|
||||||
|
# browser
|
||||||
|
vieb
|
||||||
|
mgba
|
||||||
|
|
||||||
|
# utilities
|
||||||
|
util-linux
|
||||||
|
nmap
|
||||||
|
lsof
|
||||||
|
nvd
|
||||||
|
nix-output-monitor
|
||||||
|
hyprpicker # color picker
|
||||||
|
findutils
|
||||||
|
units
|
||||||
|
vim
|
||||||
|
sshfs
|
||||||
|
fuse
|
||||||
|
ventoy
|
||||||
|
poppler_utils
|
||||||
|
vdhcoapp
|
||||||
|
|
||||||
|
# nix
|
||||||
|
alejandra
|
||||||
|
nixpkgs-fmt
|
||||||
|
deadnix
|
||||||
|
statix
|
||||||
|
nix-tree
|
||||||
|
nix-diff
|
||||||
|
nix-visualize
|
||||||
|
nix-init
|
||||||
|
nix-inspect
|
||||||
|
nixpkgs-review
|
||||||
|
manix
|
||||||
|
comma
|
||||||
|
|
||||||
|
# shellscripts
|
||||||
|
shfmt
|
||||||
|
|
||||||
|
# local file sharing
|
||||||
|
wormhole-rs
|
||||||
|
|
||||||
|
# b2 backup @backblaze
|
||||||
|
restic
|
||||||
|
|
||||||
|
# "big" programs
|
||||||
|
gimp
|
||||||
|
inkscape
|
||||||
|
zoom-us
|
||||||
|
# nomacs
|
||||||
|
libreoffice-qt
|
||||||
|
xournalpp
|
||||||
|
obsidian
|
||||||
|
spotify
|
||||||
|
vesktop # discord client
|
||||||
|
nextcloud-client
|
||||||
|
spotify-player
|
||||||
|
element-desktop
|
||||||
|
nicotine-plus
|
||||||
|
stable.transmission_3
|
||||||
|
mktorrent
|
||||||
|
hexchat
|
||||||
|
hugo
|
||||||
|
|
||||||
|
# kyria
|
||||||
|
qmk
|
||||||
|
qmk-udev-rules
|
||||||
|
|
||||||
|
# firefox related
|
||||||
|
tridactyl-native
|
||||||
|
|
||||||
|
# mako related
|
||||||
|
mako
|
||||||
|
libnotify
|
||||||
|
|
||||||
|
# general utilities
|
||||||
|
unrar
|
||||||
|
# samba
|
||||||
|
cifs-utils
|
||||||
|
zbar # qr codes
|
||||||
|
readline
|
||||||
|
autotiling
|
||||||
|
brightnessctl
|
||||||
|
libappindicator-gtk3
|
||||||
|
sqlite
|
||||||
|
speechd
|
||||||
|
networkmanagerapplet
|
||||||
|
psmisc # kill etc
|
||||||
|
lm_sensors
|
||||||
|
# jq # used for searching the i3 tree in check<xxx>.sh files
|
||||||
|
|
||||||
|
# specifically needed for anki
|
||||||
|
# mpv
|
||||||
|
anki-bin
|
||||||
|
|
||||||
|
# dirvish file previews
|
||||||
|
fd
|
||||||
|
imagemagick
|
||||||
|
# poppler
|
||||||
|
ffmpegthumbnailer
|
||||||
|
mediainfo
|
||||||
|
gnutar
|
||||||
|
unzip
|
||||||
|
|
||||||
|
#nautilus
|
||||||
|
stable.nautilus
|
||||||
|
xfce.tumbler
|
||||||
|
libgsf
|
||||||
|
|
||||||
|
# wayland stuff
|
||||||
|
wtype
|
||||||
|
wl-clipboard
|
||||||
|
stable.wl-mirror
|
||||||
|
wf-recorder
|
||||||
|
kanshi
|
||||||
|
|
||||||
|
# screenshotting tools
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
|
||||||
|
# the following packages are used (in some way) by waybar
|
||||||
|
playerctl
|
||||||
|
pavucontrol
|
||||||
|
stable.pamixer
|
||||||
|
# gnome.gnome-clocks
|
||||||
|
# wlogout
|
||||||
|
# jdiskreport
|
||||||
|
# monitor
|
||||||
|
|
||||||
|
#keychain
|
||||||
|
qalculate-gtk
|
||||||
|
gcr # needed for gnome-secrets to work
|
||||||
|
seahorse
|
||||||
|
|
||||||
|
# sops-related
|
||||||
|
sops
|
||||||
|
ssh-to-age
|
||||||
|
|
||||||
|
# mail related packages
|
||||||
|
mu
|
||||||
|
|
||||||
|
# latex and related packages
|
||||||
|
(texlive.combine {
|
||||||
|
inherit (pkgs.texlive) scheme-full
|
||||||
|
dvisvgm dvipng# for preview and export as html
|
||||||
|
wrapfig amsmath ulem hyperref capt-of;
|
||||||
|
})
|
||||||
|
|
||||||
|
# font stuff
|
||||||
|
nerd-fonts.fira-mono
|
||||||
|
nerd-fonts.fira-code
|
||||||
|
nerd-fonts.symbols-only
|
||||||
|
noto-fonts-emoji
|
||||||
|
font-awesome_5
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/home/common/password-store.nix
Normal file
13
modules/home/common/password-store.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.passwordstore = lib.mkEnableOption "passwordstore settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.passwordstore {
|
||||||
|
programs.password-store = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
||||||
|
};
|
||||||
|
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
25
modules/home/common/programs.nix
Normal file
25
modules/home/common/programs.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.programs = lib.mkEnableOption "programs settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.programs {
|
||||||
|
programs = {
|
||||||
|
bottom.enable = true;
|
||||||
|
imv.enable = true;
|
||||||
|
sioyek.enable = true;
|
||||||
|
bat = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs.bat-extras; [ batdiff batman batgrep batwatch ];
|
||||||
|
};
|
||||||
|
carapace.enable = true;
|
||||||
|
wlogout.enable = true;
|
||||||
|
swayr.enable = true;
|
||||||
|
yt-dlp.enable = true;
|
||||||
|
mpv.enable = true;
|
||||||
|
jq.enable = true;
|
||||||
|
ripgrep.enable = true;
|
||||||
|
pandoc.enable = true;
|
||||||
|
fzf.enable = true;
|
||||||
|
zoxide.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
47
modules/home/common/settings.nix
Normal file
47
modules/home/common/settings.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.swarselsystems) mainUser;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.general = lib.mkEnableOption "general nix settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.general {
|
||||||
|
nix = lib.mkIf (!config.swarselsystems.isNixos) {
|
||||||
|
settings = {
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
"ca-derivations"
|
||||||
|
"cgroups"
|
||||||
|
"pipe-operators"
|
||||||
|
];
|
||||||
|
trusted-users = [ "@wheel" "${mainUser}" ];
|
||||||
|
connect-timeout = 5;
|
||||||
|
bash-prompt-prefix = "[33m$SHLVL:\\w [0m";
|
||||||
|
bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"[31m\"; else printf \"[32m\"; fi)\[\e[1m\]λ\[\e[0m\] [0m";
|
||||||
|
fallback = true;
|
||||||
|
min-free = 128000000;
|
||||||
|
max-free = 1000000000;
|
||||||
|
auto-optimise-store = true;
|
||||||
|
warn-dirty = false;
|
||||||
|
max-jobs = 1;
|
||||||
|
use-cgroups = lib.mkIf config.swarselsystems.isLinux true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = lib.mkIf config.swarselsystems.isNixos (lib.mkForce null);
|
||||||
|
|
||||||
|
programs.home-manager.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
|
||||||
|
targets.genericLinux.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = lib.mkDefault mainUser;
|
||||||
|
homeDirectory = lib.mkDefault "/home/${mainUser}";
|
||||||
|
stateVersion = lib.mkDefault "23.05";
|
||||||
|
keyboard.layout = "us";
|
||||||
|
sessionVariables = {
|
||||||
|
FLAKE = "/home/${mainUser}/.dotfiles";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -11,10 +11,104 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.swarselsystems = {
|
options.swarselsystems = {
|
||||||
|
isLaptop = lib.mkEnableOption "laptop host";
|
||||||
|
isNixos = lib.mkEnableOption "nixos host";
|
||||||
|
isPublic = lib.mkEnableOption "is a public machine (no secrets)";
|
||||||
|
isDarwin = lib.mkEnableOption "darwin host";
|
||||||
|
isLinux = lib.mkEnableOption "whether this is a linux machine";
|
||||||
|
isBtrfs = lib.mkEnableOption "use btrfs filesystem";
|
||||||
|
mainUser = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "swarsel";
|
||||||
|
};
|
||||||
|
homeDir = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "/home/swarsel";
|
||||||
|
};
|
||||||
|
xdgDir = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "/run/user/1000";
|
||||||
|
};
|
||||||
|
flakePath = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "/home/swarsel/.dotfiles";
|
||||||
|
};
|
||||||
|
wallpaper = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
default = "${self}/wallpaper/lenovowp.png";
|
||||||
|
};
|
||||||
|
sharescreen = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
lowResolution = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
highResolution = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
stylix = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
default = {
|
||||||
|
enable = true;
|
||||||
|
base16Scheme = "${self}/programs/stylix/swarsel.yaml";
|
||||||
|
polarity = "dark";
|
||||||
|
opacity.popups = 0.5;
|
||||||
|
cursor = {
|
||||||
|
package = pkgs.banana-cursor;
|
||||||
|
# package = pkgs.capitaine-cursors;
|
||||||
|
name = "Banana";
|
||||||
|
# name = "capitaine-cursors";
|
||||||
|
size = 16;
|
||||||
|
};
|
||||||
|
fonts = {
|
||||||
|
sizes = {
|
||||||
|
terminal = 10;
|
||||||
|
applications = 11;
|
||||||
|
};
|
||||||
|
serif = {
|
||||||
|
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||||
|
package = pkgs.cantarell-fonts;
|
||||||
|
# package = pkgs.montserrat;
|
||||||
|
name = "Cantarell";
|
||||||
|
# name = "FiraCode Nerd Font Propo";
|
||||||
|
# name = "Montserrat";
|
||||||
|
};
|
||||||
|
sansSerif = {
|
||||||
|
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||||
|
package = pkgs.cantarell-fonts;
|
||||||
|
# package = pkgs.montserrat;
|
||||||
|
name = "Cantarell";
|
||||||
|
# name = "FiraCode Nerd Font Propo";
|
||||||
|
# name = "Montserrat";
|
||||||
|
};
|
||||||
|
monospace = {
|
||||||
|
package = pkgs.nerd-fonts.fira-mono; # has overrides
|
||||||
|
name = "FiraCode Nerd Font Mono";
|
||||||
|
};
|
||||||
|
emoji = {
|
||||||
|
package = pkgs.noto-fonts-emoji;
|
||||||
|
name = "Noto Color Emoji";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
stylixHomeTargets = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
default = {
|
||||||
|
emacs.enable = false;
|
||||||
|
waybar.enable = false;
|
||||||
|
sway.useWallpaper = false;
|
||||||
|
firefox.profileNames = [ "default" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
firefox = lib.mkOption {
|
firefox = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
default = {
|
default = {
|
||||||
isDefault = false;
|
|
||||||
userChrome = builtins.readFile "${self}/programs/firefox/chrome/userChrome.css";
|
userChrome = builtins.readFile "${self}/programs/firefox/chrome/userChrome.css";
|
||||||
extensions = {
|
extensions = {
|
||||||
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
|
|
@ -38,6 +132,9 @@ in
|
||||||
unpaywall
|
unpaywall
|
||||||
don-t-fuck-with-paste
|
don-t-fuck-with-paste
|
||||||
plasma-integration
|
plasma-integration
|
||||||
|
noscript
|
||||||
|
|
||||||
|
# configure a shortcut 'ctrl+shift+c' with behaviour 'do nothing' in order to disable the dev console shortcut
|
||||||
(buildFirefoxXpiAddon {
|
(buildFirefoxXpiAddon {
|
||||||
pname = "shortkeys";
|
pname = "shortkeys";
|
||||||
version = "4.0.2";
|
version = "4.0.2";
|
||||||
|
|
@ -86,9 +183,9 @@ in
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
# default = "Kagi";
|
# default = "Kagi";
|
||||||
default = "Google";
|
default = "google";
|
||||||
# privateDefault = "Kagi";
|
# privateDefault = "Kagi";
|
||||||
privateDefault = "Google";
|
privateDefault = "google";
|
||||||
engines = {
|
engines = {
|
||||||
"Kagi" = {
|
"Kagi" = {
|
||||||
urls = [{
|
urls = [{
|
||||||
|
|
@ -97,7 +194,7 @@ in
|
||||||
{ name = "q"; value = "{searchTerms}"; }
|
{ name = "q"; value = "{searchTerms}"; }
|
||||||
];
|
];
|
||||||
}];
|
}];
|
||||||
iconUpdateURL = "https://kagi.com/favicon.ico";
|
icon = "https://kagi.com/favicon.ico";
|
||||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||||
definedAliases = [ "@k" ];
|
definedAliases = [ "@k" ];
|
||||||
};
|
};
|
||||||
|
|
@ -118,7 +215,7 @@ in
|
||||||
urls = [{
|
urls = [{
|
||||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||||
}];
|
}];
|
||||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
icon = "https://nixos.wiki/favicon.png";
|
||||||
updateInterval = 24 * 60 * 60 * 1000; # every day
|
updateInterval = 24 * 60 * 60 * 1000; # every day
|
||||||
definedAliases = [ "@nw" ];
|
definedAliases = [ "@nw" ];
|
||||||
};
|
};
|
||||||
|
|
@ -147,12 +244,34 @@ in
|
||||||
definedAliases = [ "@hm" "@ho" "@hmo" ];
|
definedAliases = [ "@hm" "@ho" "@hmo" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"Google".metaData.alias = "@g";
|
"Confluence search" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://vbc.atlassian.net/wiki/search";
|
||||||
|
params = [
|
||||||
|
{ name = "text"; value = "{searchTerms}"; }
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
|
||||||
|
definedAliases = [ "@c" "@cf" "@confluence" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Jira search" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://vbc.atlassian.net/issues/";
|
||||||
|
params = [
|
||||||
|
{ name = "jql"; value = "textfields ~ \"{searchTerms}*\"&wildcardFlag=true"; }
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
|
||||||
|
definedAliases = [ "@j" "@jire" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"google".metaData.alias = "@g";
|
||||||
};
|
};
|
||||||
force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
};
|
||||||
}
|
}
|
||||||
23
modules/home/common/sops.nix
Normal file
23
modules/home/common/sops.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.swarselsystems) homeDir xdgDir;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.sops = lib.mkEnableOption "sops settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.sops {
|
||||||
|
sops = lib.mkIf (!config.swarselsystems.isPublic) {
|
||||||
|
age.sshKeyPaths = [ "${homeDir}/.ssh/sops" "${homeDir}/.ssh/ssh_host_ed25519_key" ];
|
||||||
|
defaultSopsFile = lib.swarselsystems.mkIfElseList config.swarselsystems.isBtrfs "/persist/.dotfiles/secrets/general/secrets.yaml" "${homeDir}/.dotfiles/secrets/general/secrets.yaml";
|
||||||
|
|
||||||
|
validateSopsFiles = false;
|
||||||
|
secrets = {
|
||||||
|
mrswarsel = { path = "${xdgDir}/secrets/mrswarsel"; };
|
||||||
|
nautilus = { path = "${xdgDir}/secrets/nautilus"; };
|
||||||
|
leon = { path = "${xdgDir}/secrets/leon"; };
|
||||||
|
swarselmail = { path = "${xdgDir}/secrets/swarselmail"; };
|
||||||
|
github_notif = { path = "${xdgDir}/secrets/github_notif"; };
|
||||||
|
u2f_keys = { path = "${homeDir}/.config/Yubico/u2f_keys"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
40
modules/home/common/ssh.nix
Normal file
40
modules/home/common/ssh.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.ssh = lib.mkEnableOption "ssh settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.ssh {
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
forwardAgent = true;
|
||||||
|
extraConfig = ''
|
||||||
|
SetEnv TERM=xterm-256color
|
||||||
|
ServerAliveInterval 20
|
||||||
|
'';
|
||||||
|
matchBlocks = {
|
||||||
|
"pfsense" = {
|
||||||
|
hostname = "192.168.1.1";
|
||||||
|
user = "root";
|
||||||
|
};
|
||||||
|
"winters" = {
|
||||||
|
hostname = "192.168.1.2";
|
||||||
|
user = "swarsel";
|
||||||
|
};
|
||||||
|
"minecraft" = {
|
||||||
|
hostname = "130.61.119.129";
|
||||||
|
user = "opc";
|
||||||
|
};
|
||||||
|
"sync" = {
|
||||||
|
hostname = "193.122.53.173";
|
||||||
|
user = "root";
|
||||||
|
};
|
||||||
|
"songdiver" = {
|
||||||
|
hostname = "89.168.100.65";
|
||||||
|
user = "ubuntu";
|
||||||
|
};
|
||||||
|
"pkv" = {
|
||||||
|
hostname = "46.232.248.161";
|
||||||
|
user = "root";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
124
modules/home/common/starship.nix
Normal file
124
modules/home/common/starship.nix
Normal file
|
|
@ -0,0 +1,124 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.starship = lib.mkEnableOption "starship settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.starship {
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = false;
|
||||||
|
format = "$shlvl$character";
|
||||||
|
right_format = "$all";
|
||||||
|
command_timeout = 3000;
|
||||||
|
|
||||||
|
directory.substitutions = {
|
||||||
|
"Documents" = " ";
|
||||||
|
"Downloads" = " ";
|
||||||
|
"Music" = " ";
|
||||||
|
"Pictures" = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
git_status = {
|
||||||
|
style = "bg:#394260";
|
||||||
|
format = "[[($all_status$ahead_behind)](fg:#769ff0 bg:#394260)]($style) ";
|
||||||
|
};
|
||||||
|
|
||||||
|
character = {
|
||||||
|
success_symbol = "[λ](bold green)";
|
||||||
|
error_symbol = "[λ](bold red)";
|
||||||
|
};
|
||||||
|
|
||||||
|
shlvl = {
|
||||||
|
disabled = false;
|
||||||
|
symbol = "↳";
|
||||||
|
format = "[$symbol]($style) ";
|
||||||
|
repeat = true;
|
||||||
|
repeat_offset = 1;
|
||||||
|
style = "blue";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix_shell = {
|
||||||
|
disabled = false;
|
||||||
|
heuristic = true;
|
||||||
|
format = "[$symbol$name]($style)";
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
aws.symbol = " ";
|
||||||
|
buf.symbol = " ";
|
||||||
|
c.symbol = " ";
|
||||||
|
conda.symbol = " ";
|
||||||
|
dart.symbol = " ";
|
||||||
|
directory.read_only = " ";
|
||||||
|
docker_context.symbol = " ";
|
||||||
|
elixir.symbol = " ";
|
||||||
|
elm.symbol = " ";
|
||||||
|
fossil_branch.symbol = " ";
|
||||||
|
git_branch.symbol = " ";
|
||||||
|
golang.symbol = " ";
|
||||||
|
guix_shell.symbol = " ";
|
||||||
|
haskell.symbol = " ";
|
||||||
|
haxe.symbol = " ";
|
||||||
|
hg_branch.symbol = " ";
|
||||||
|
hostname.ssh_symbol = " ";
|
||||||
|
java.symbol = " ";
|
||||||
|
julia.symbol = " ";
|
||||||
|
lua.symbol = " ";
|
||||||
|
memory_usage.symbol = " ";
|
||||||
|
meson.symbol = " ";
|
||||||
|
nim.symbol = " ";
|
||||||
|
nodejs.symbol = " ";
|
||||||
|
|
||||||
|
os.symbols = {
|
||||||
|
Alpaquita = " ";
|
||||||
|
Alpine = " ";
|
||||||
|
Amazon = " ";
|
||||||
|
Android = " ";
|
||||||
|
Arch = " ";
|
||||||
|
Artix = " ";
|
||||||
|
CentOS = " ";
|
||||||
|
Debian = " ";
|
||||||
|
DragonFly = " ";
|
||||||
|
Emscripten = " ";
|
||||||
|
EndeavourOS = " ";
|
||||||
|
Fedora = " ";
|
||||||
|
FreeBSD = " ";
|
||||||
|
Garuda = " ";
|
||||||
|
Gentoo = " ";
|
||||||
|
HardenedBSD = " ";
|
||||||
|
Illumos = " ";
|
||||||
|
Linux = " ";
|
||||||
|
Mabox = " ";
|
||||||
|
Macos = " ";
|
||||||
|
Manjaro = " ";
|
||||||
|
Mariner = " ";
|
||||||
|
MidnightBSD = " ";
|
||||||
|
Mint = " ";
|
||||||
|
NetBSD = " ";
|
||||||
|
NixOS = " ";
|
||||||
|
OpenBSD = " ";
|
||||||
|
openSUSE = " ";
|
||||||
|
OracleLinux = " ";
|
||||||
|
Pop = " ";
|
||||||
|
Raspbian = " ";
|
||||||
|
Redhat = " ";
|
||||||
|
RedHatEnterprise = " ";
|
||||||
|
Redox = " ";
|
||||||
|
Solus = " ";
|
||||||
|
SUSE = " ";
|
||||||
|
Ubuntu = " ";
|
||||||
|
Unknown = " ";
|
||||||
|
Windows = " ";
|
||||||
|
};
|
||||||
|
|
||||||
|
package.symbol = " ";
|
||||||
|
pijul_channel.symbol = " ";
|
||||||
|
python.symbol = " ";
|
||||||
|
rlang.symbol = " ";
|
||||||
|
ruby.symbol = " ";
|
||||||
|
rust.symbol = " ";
|
||||||
|
scala.symbol = " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
12
modules/home/common/stylix.nix
Normal file
12
modules/home/common/stylix.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.stylix = lib.mkEnableOption "stylix settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.stylix {
|
||||||
|
stylix = lib.mkIf (!config.swarselsystems.isNixos) (lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
image = config.swarselsystems.wallpaper;
|
||||||
|
targets = config.swarselsystems.stylixHomeTargets;
|
||||||
|
}
|
||||||
|
config.swarselsystems.stylix);
|
||||||
|
};
|
||||||
|
}
|
||||||
405
modules/home/common/sway.nix
Normal file
405
modules/home/common/sway.nix
Normal file
|
|
@ -0,0 +1,405 @@
|
||||||
|
{ self, config, lib, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems = {
|
||||||
|
modules.sway = lib.mkEnableOption "sway settings";
|
||||||
|
inputs = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
monitors = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
keybindings = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
startup = lib.mkOption {
|
||||||
|
type = lib.types.listOf (lib.types.attrsOf lib.types.str);
|
||||||
|
default = [
|
||||||
|
{ command = "nextcloud --background"; }
|
||||||
|
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
||||||
|
{ command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
||||||
|
{ command = "ANKI_WAYLAND=1 anki"; }
|
||||||
|
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
||||||
|
{ command = "nm-applet"; }
|
||||||
|
{ command = "feishin"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kyria = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||||
|
default = {
|
||||||
|
"36125:53060:splitkb.com_splitkb.com_Kyria_rev3" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
};
|
||||||
|
"7504:24926:Kyria_Keyboard" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
standardinputs = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||||
|
default = lib.recursiveUpdate (lib.recursiveUpdate config.swarselsystems.touchpad config.swarselsystems.kyria) config.swarselsystems.inputs;
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
touchpad = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
||||||
|
default = { };
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
swayfxConfig = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "
|
||||||
|
blur enable
|
||||||
|
blur_xray disable
|
||||||
|
blur_passes 1
|
||||||
|
blur_radius 1
|
||||||
|
shadows enable
|
||||||
|
corner_radius 2
|
||||||
|
titlebar_separator disable
|
||||||
|
default_dim_inactive 0.02
|
||||||
|
";
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.sway {
|
||||||
|
swarselsystems = {
|
||||||
|
touchpad = lib.mkIf config.swarselsystems.isLaptop {
|
||||||
|
"type:touchpad" = {
|
||||||
|
dwt = "enabled";
|
||||||
|
tap = "enabled";
|
||||||
|
natural_scroll = "enabled";
|
||||||
|
middle_emulation = "enabled";
|
||||||
|
drag_lock = "disabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
swayfxConfig = lib.mkIf (!config.swarselsystems.isNixos) " ";
|
||||||
|
};
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
checkConfig = false; # delete this line once SwayFX is fixed upstream
|
||||||
|
package = lib.mkIf config.swarselsystems.isNixos null;
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
xdgAutostart = true;
|
||||||
|
};
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
config = rec {
|
||||||
|
modifier = "Mod4";
|
||||||
|
# terminal = "kitty";
|
||||||
|
menu = "fuzzel";
|
||||||
|
bars = [{
|
||||||
|
command = "waybar";
|
||||||
|
mode = "hide";
|
||||||
|
hiddenState = "hide";
|
||||||
|
position = "top";
|
||||||
|
extraConfig = "modifier Mod4";
|
||||||
|
}];
|
||||||
|
keybindings =
|
||||||
|
let
|
||||||
|
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||||
|
in
|
||||||
|
lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
"${modifier}+q" = "kill";
|
||||||
|
"${modifier}+f" = "exec firefox";
|
||||||
|
"${modifier}+Shift+f" = "exec swaymsg fullscreen";
|
||||||
|
"${modifier}+Space" = "exec fuzzel";
|
||||||
|
"${modifier}+Shift+Space" = "floating toggle";
|
||||||
|
"${modifier}+e" = "exec emacsclient -nquc -a emacs -e \"(dashboard-open)\"";
|
||||||
|
"${modifier}+Shift+m" = "exec emacsclient -nquc -a emacs -e \"(mu4e)\"";
|
||||||
|
"${modifier}+Shift+c" = "exec emacsclient -nquc -a emacs -e \"(swarsel/open-calendar)\"";
|
||||||
|
"${modifier}+m" = "exec swaymsg workspace back_and_forth";
|
||||||
|
"${modifier}+a" = "exec swarselcheck -s";
|
||||||
|
"${modifier}+x" = "exec swarselcheck -k";
|
||||||
|
"${modifier}+d" = "exec swarselcheck -d";
|
||||||
|
"${modifier}+w" = "exec swarselcheck -e";
|
||||||
|
"${modifier}+Shift+t" = "exec opacitytoggle";
|
||||||
|
"${modifier}+Shift+F12" = "move scratchpad";
|
||||||
|
"${modifier}+F12" = "scratchpad show";
|
||||||
|
"${modifier}+c" = "exec qalculate-gtk";
|
||||||
|
"${modifier}+p" = "exec pass-fuzzel";
|
||||||
|
"${modifier}+o" = "exec pass-fuzzel --otp";
|
||||||
|
"${modifier}+Shift+p" = "exec pass-fuzzel --type";
|
||||||
|
"${modifier}+Shift+o" = "exec pass-fuzzel --otp --type";
|
||||||
|
"${modifier}+Ctrl+p" = "exec 1password --quick-acces";
|
||||||
|
"${modifier}+Escape" = "mode $exit";
|
||||||
|
"${modifier}+Shift+Escape" = "exec kitty -o confirm_os_window_close=0 btm";
|
||||||
|
"${modifier}+h" = "exec hyprpicker | wl-copy";
|
||||||
|
"${modifier}+s" = "exec grim -g \"$(slurp)\" -t png - | wl-copy -t image/png";
|
||||||
|
"${modifier}+Shift+s" = "exec slurp | grim -g - Pictures/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')";
|
||||||
|
"${modifier}+Shift+v" = "exec wf-recorder -g '$(slurp -f %o -or)' -f ~/Videos/screenrecord_$(date +%Y-%m-%d-%H%M%S).mkv";
|
||||||
|
"${modifier}+1" = "workspace 1:一";
|
||||||
|
"${modifier}+Shift+1" = "move container to workspace 1:一";
|
||||||
|
"${modifier}+2" = "workspace 2:二";
|
||||||
|
"${modifier}+Shift+2" = "move container to workspace 2:二";
|
||||||
|
"${modifier}+3" = "workspace 3:三";
|
||||||
|
"${modifier}+Shift+3" = "move container to workspace 3:三";
|
||||||
|
"${modifier}+4" = "workspace 4:四";
|
||||||
|
"${modifier}+Shift+4" = "move container to workspace 4:四";
|
||||||
|
"${modifier}+5" = "workspace 5:五";
|
||||||
|
"${modifier}+Shift+5" = "move container to workspace 5:五";
|
||||||
|
"${modifier}+6" = "workspace 6:六";
|
||||||
|
"${modifier}+Shift+6" = "move container to workspace 6:六";
|
||||||
|
"${modifier}+7" = "workspace 7:七";
|
||||||
|
"${modifier}+Shift+7" = "move container to workspace 7:七";
|
||||||
|
"${modifier}+8" = "workspace 8:八";
|
||||||
|
"${modifier}+Shift+8" = "move container to workspace 8:八";
|
||||||
|
"${modifier}+9" = "workspace 9:九";
|
||||||
|
"${modifier}+Shift+9" = "move container to workspace 9:九";
|
||||||
|
"${modifier}+0" = "workspace 10:十";
|
||||||
|
"${modifier}+Shift+0" = "move container to workspace 10:十";
|
||||||
|
"${modifier}+Ctrl+m" = "workspace 11:M";
|
||||||
|
"${modifier}+Ctrl+Shift+m" = "move container to workspace 11:M";
|
||||||
|
"${modifier}+Ctrl+s" = "workspace 12:S";
|
||||||
|
"${modifier}+Ctrl+Shift+s" = "move container to workspace 12:S";
|
||||||
|
"${modifier}+Ctrl+e" = "workspace 13:E";
|
||||||
|
"${modifier}+Ctrl+Shift+e" = "move container to workspace 13:E";
|
||||||
|
"${modifier}+Ctrl+t" = "workspace 14:T";
|
||||||
|
"${modifier}+Ctrl+Shift+t" = "move container to workspace 14:T";
|
||||||
|
"${modifier}+Ctrl+l" = "workspace 15:L";
|
||||||
|
"${modifier}+Ctrl+Shift+l" = "move container to workspace 15:L";
|
||||||
|
"${modifier}+Ctrl+f" = "workspace 16:F";
|
||||||
|
"${modifier}+Ctrl+Shift+f" = "move container to workspace 16:F";
|
||||||
|
"${modifier}+Left" = "focus left";
|
||||||
|
"${modifier}+Right" = "focus right";
|
||||||
|
"${modifier}+Down" = "focus down";
|
||||||
|
"${modifier}+Up" = "focus up";
|
||||||
|
"${modifier}+Shift+Left" = "move left 40px";
|
||||||
|
"${modifier}+Shift+Right" = "move right 40px";
|
||||||
|
"${modifier}+Shift+Down" = "move down 40px";
|
||||||
|
"${modifier}+Shift+Up" = "move up 40px";
|
||||||
|
"${modifier}+Ctrl+Shift+c" = "reload";
|
||||||
|
"${modifier}+Ctrl+Shift+r" = "exec swarsel-displaypower";
|
||||||
|
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
|
||||||
|
"${modifier}+r" = "mode resize";
|
||||||
|
# "${modifier}+Return" = "exec kitty";
|
||||||
|
"${modifier}+Return" = "exec swarselzellij";
|
||||||
|
"${modifier}+Print" = "exec screenshare";
|
||||||
|
# exec swaymsg move workspace to "$(swaymsg -t get_outputs | jq '[.[] | select(.active == true)] | .[(map(.focused) | index(true) + 1) % length].name')"
|
||||||
|
# "XF86AudioRaiseVolume" = "exec pa 5%";
|
||||||
|
# "XF86AudioRaiseVolume" = "exec pamixer -i 5";
|
||||||
|
"XF86AudioRaiseVolume" = "exec swayosd-client --output-volume raise";
|
||||||
|
# "XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||||
|
# "XF86AudioLowerVolume" = "exec pamixer -d 5";
|
||||||
|
"XF86AudioLowerVolume" = "exec swayosd-client --output-volume lower";
|
||||||
|
# "XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
|
# "XF86AudioMute" = "exec pamixer -t";
|
||||||
|
"XF86AudioMute" = "exec swayosd-client --output-volume mute-toggle";
|
||||||
|
# "XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||||
|
"XF86MonBrightnessUp" = "exec swayosd-client --brightness raise";
|
||||||
|
# "XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||||
|
"XF86MonBrightnessDown" = "exec swayosd-client --brightness lower";
|
||||||
|
"XF86Display" = "exec wl-mirror eDP-1";
|
||||||
|
}
|
||||||
|
config.swarselsystems.keybindings;
|
||||||
|
modes = {
|
||||||
|
resize = {
|
||||||
|
Down = "resize grow height 10 px or 10 ppt";
|
||||||
|
Escape = "mode default";
|
||||||
|
Left = "resize shrink width 10 px or 10 ppt";
|
||||||
|
Return = "mode default";
|
||||||
|
Right = "resize grow width 10 px or 10 ppt";
|
||||||
|
Up = "resize shrink height 10 px or 10 ppt";
|
||||||
|
Tab = "move position center, resize set width 50 ppt height 50 ppt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
defaultWorkspace = "workspace 1:一";
|
||||||
|
# output = lib.mapAttrs' lib.swarselsystems.eachMonitor monitors;
|
||||||
|
output = {
|
||||||
|
"${config.swarselsystems.sharescreen}" = {
|
||||||
|
bg = "${self}/wallpaper/lenovowp.png ${config.stylix.imageScalingMode}";
|
||||||
|
};
|
||||||
|
"Philips Consumer Electronics Company PHL BDM3270 AU11806002320" = {
|
||||||
|
bg = "${self}/wallpaper/standwp.png ${config.stylix.imageScalingMode}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
input = config.swarselsystems.standardinputs;
|
||||||
|
workspaceOutputAssign =
|
||||||
|
let
|
||||||
|
workplaceSets = lib.mapAttrs' lib.swarselsystems.eachOutput config.swarselsystems.monitors;
|
||||||
|
workplaceOutputs = map (key: lib.getAttr key workplaceSets) (lib.attrNames workplaceSets);
|
||||||
|
in
|
||||||
|
workplaceOutputs;
|
||||||
|
startup = config.swarselsystems.startup ++ [
|
||||||
|
{ command = "kitty -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm"; }
|
||||||
|
{ command = "sleep 60; kitty -T spotifytui -o confirm_os_window_close=0 spotify_player"; }
|
||||||
|
];
|
||||||
|
seat = {
|
||||||
|
"*" = {
|
||||||
|
hide_cursor = "when-typing enable";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
border = 1;
|
||||||
|
titlebar = false;
|
||||||
|
};
|
||||||
|
assigns = {
|
||||||
|
"15:L" = [{ app_id = "teams-for-linux"; }];
|
||||||
|
};
|
||||||
|
floating = {
|
||||||
|
border = 1;
|
||||||
|
criteria = [
|
||||||
|
{ app_id = "qalculate-gtk"; }
|
||||||
|
{ app_id = "blueman"; }
|
||||||
|
{ app_id = "pavucontrol"; }
|
||||||
|
{ app_id = "syncthingtray"; }
|
||||||
|
{ app_id = "Element"; }
|
||||||
|
{ class = "1Password"; }
|
||||||
|
{ app_id = "com.nextcloud.desktopclient.nextcloud"; }
|
||||||
|
{ title = "(?:Open|Save) (?:File|Folder|As)"; }
|
||||||
|
{ title = "^Add$"; }
|
||||||
|
{ title = "^Picture-in-Picture$"; }
|
||||||
|
{ title = "Syncthing Tray"; }
|
||||||
|
{ title = "^spotifytui$"; }
|
||||||
|
{ title = "^kittyterm$"; }
|
||||||
|
{ app_id = "vesktop"; }
|
||||||
|
{ window_role = "pop-up"; }
|
||||||
|
{ window_role = "bubble"; }
|
||||||
|
{ window_role = "dialog"; }
|
||||||
|
{ window_role = "task_dialog"; }
|
||||||
|
{ window_role = "menu"; }
|
||||||
|
{ window_role = "Preferences"; }
|
||||||
|
];
|
||||||
|
titlebar = false;
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
command = "opacity 0.95";
|
||||||
|
criteria = {
|
||||||
|
class = ".*";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "opacity 1";
|
||||||
|
criteria = {
|
||||||
|
app_id = "at.yrlf.wl_mirror";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "opacity 1";
|
||||||
|
criteria = {
|
||||||
|
app_id = "Gimp-2.10";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "opacity 0.99";
|
||||||
|
criteria = {
|
||||||
|
app_id = "firefox";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "opacity 0.99";
|
||||||
|
criteria = {
|
||||||
|
app_id = "chromium-browser";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "sticky enable, shadows enable";
|
||||||
|
criteria = {
|
||||||
|
title = "^Picture-in-Picture$";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "resize set width 60 ppt height 60 ppt, opacity 0.8, sticky enable, border normal, move container to scratchpad";
|
||||||
|
criteria = {
|
||||||
|
title = "^kittyterm$";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "resize set width 60 ppt height 60 ppt, opacity 0.95, sticky enable, border normal, move container to scratchpad";
|
||||||
|
criteria = {
|
||||||
|
title = "^spotifytui$";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
|
||||||
|
command = "resize set width 60 ppt height 60 ppt, sticky enable, move container to scratchpad";
|
||||||
|
criteria = {
|
||||||
|
class = "Spotify";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "resize set width 60 ppt height 60 ppt, sticky enable";
|
||||||
|
criteria = {
|
||||||
|
app_id = "vesktop";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "resize set width 60 ppt height 60 ppt, sticky enable";
|
||||||
|
criteria = {
|
||||||
|
class = "Element";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# {
|
||||||
|
# command = "resize set width 60 ppt height 60 ppt, sticky enable, move container to scratchpad";
|
||||||
|
# criteria = {
|
||||||
|
# app_id="^$";
|
||||||
|
# class="^$";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
gaps = {
|
||||||
|
inner = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraSessionCommands = ''
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
|
export XDG_SESSION_DESKTOP=sway
|
||||||
|
export QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox";
|
||||||
|
export ANKI_WAYLAND=1;
|
||||||
|
export OBSIDIAN_USE_WAYLAND=1;
|
||||||
|
'';
|
||||||
|
# extraConfigEarly = "
|
||||||
|
# exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||||
|
# exec hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
|
||||||
|
# ";
|
||||||
|
extraConfig =
|
||||||
|
let
|
||||||
|
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||||
|
swayfxSettings = config.swarselsystems.swayfxConfig;
|
||||||
|
in
|
||||||
|
"
|
||||||
|
exec_always autotiling
|
||||||
|
set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
|
||||||
|
|
||||||
|
mode $exit {
|
||||||
|
bindsym --to-code {
|
||||||
|
s exec \"systemctl suspend\", mode \"default\"
|
||||||
|
h exec \"systemctl hibernate\", mode \"default\"
|
||||||
|
l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize\", mode \"default\
|
||||||
|
p exec \"systemctl poweroff\"
|
||||||
|
r exec \"systemctl reboot\"
|
||||||
|
u exec \"swaymsg exit\"
|
||||||
|
|
||||||
|
Return mode \"default\"
|
||||||
|
Escape mode \"default\"
|
||||||
|
${modifier}+Escape mode \"default\"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exec systemctl --user import-environment
|
||||||
|
exec swayidle -w
|
||||||
|
|
||||||
|
seat * hide_cursor 2000
|
||||||
|
|
||||||
|
exec_always kill -1 $(pidof kanshi)
|
||||||
|
|
||||||
|
bindswitch --locked lid:on exec kanshictl switch lidclosed
|
||||||
|
bindswitch --locked lid:off exec kanshictl switch lidopen
|
||||||
|
|
||||||
|
${swayfxSettings}
|
||||||
|
";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/home/common/swayosd.nix
Normal file
10
modules/home/common/swayosd.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.swayosd = lib.mkEnableOption "swayosd settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.swayosd {
|
||||||
|
services.swayosd = {
|
||||||
|
enable = true;
|
||||||
|
topMargin = 0.5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
32
modules/home/common/symlink.nix
Normal file
32
modules/home/common/symlink.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ self, lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.symlink = lib.mkEnableOption "symlink settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.symlink {
|
||||||
|
home.file = {
|
||||||
|
"init.el" = lib.mkDefault {
|
||||||
|
source = self + /programs/emacs/init.el;
|
||||||
|
target = ".emacs.d/init.el";
|
||||||
|
};
|
||||||
|
"early-init.el" = {
|
||||||
|
source = self + /programs/emacs/early-init.el;
|
||||||
|
target = ".emacs.d/early-init.el";
|
||||||
|
};
|
||||||
|
# on NixOS, Emacs does not find the aspell dicts easily. Write the configuration manually
|
||||||
|
".aspell.conf" = {
|
||||||
|
source = self + /programs/config/.aspell.conf;
|
||||||
|
target = ".aspell.conf";
|
||||||
|
};
|
||||||
|
".gitmessage" = {
|
||||||
|
source = self + /programs/git/.gitmessage;
|
||||||
|
target = ".gitmessage";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"tridactyl/tridactylrc".source = self + /programs/firefox/tridactyl/tridactylrc;
|
||||||
|
"tridactyl/themes/base16-codeschool.css".source = self + /programs/firefox/tridactyl/themes/base16-codeschool.css;
|
||||||
|
"tridactyl/themes/swarsel.css".source = self + /programs/firefox/tridactyl/themes/swarsel.css;
|
||||||
|
"swayidle/config".source = self + /programs/swayidle/config;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
99
modules/home/common/tmux.nix
Normal file
99
modules/home/common/tmux.nix
Normal file
|
|
@ -0,0 +1,99 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
tmux-super-fingers = pkgs.tmuxPlugins.mkTmuxPlugin
|
||||||
|
{
|
||||||
|
pluginName = "tmux-super-fingers";
|
||||||
|
version = "unstable-2023-01-06";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "artemave";
|
||||||
|
repo = "tmux_super_fingers";
|
||||||
|
rev = "2c12044984124e74e21a5a87d00f844083e4bdf7";
|
||||||
|
sha256 = "sha256-cPZCV8xk9QpU49/7H8iGhQYK6JwWjviL29eWabuqruc=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.tmux = lib.mkEnableOption "tmux settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.tmux {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
lsof
|
||||||
|
sesh
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
shell = "${pkgs.zsh}/bin/zsh";
|
||||||
|
terminal = "tmux-256color";
|
||||||
|
historyLimit = 100000;
|
||||||
|
plugins = with pkgs;
|
||||||
|
[
|
||||||
|
tmuxPlugins.tmux-thumbs
|
||||||
|
{
|
||||||
|
plugin = tmux-super-fingers;
|
||||||
|
extraConfig = "set -g @super-fingers-key f";
|
||||||
|
}
|
||||||
|
|
||||||
|
tmuxPlugins.sensible
|
||||||
|
# must be before continuum edits right status bar
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.catppuccin;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @catppuccin_flavour 'frappe'
|
||||||
|
set -g @catppuccin_window_tabs_enabled on
|
||||||
|
set -g @catppuccin_date_time "%H:%M"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.resurrect;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @resurrect-strategy-vim 'session'
|
||||||
|
set -g @resurrect-strategy-nvim 'session'
|
||||||
|
set -g @resurrect-capture-pane-contents 'on'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
{
|
||||||
|
plugin = tmuxPlugins.continuum;
|
||||||
|
extraConfig = ''
|
||||||
|
set -g @continuum-restore 'on'
|
||||||
|
set -g @continuum-boot 'on'
|
||||||
|
set -g @continuum-save-interval '10'
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
tmuxPlugins.better-mouse-mode
|
||||||
|
tmuxPlugins.yank
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
set -g default-terminal "tmux-256color"
|
||||||
|
set -ag terminal-overrides ",xterm-256color:RGB"
|
||||||
|
|
||||||
|
set-option -g prefix C-a
|
||||||
|
unbind-key C-b
|
||||||
|
bind-key C-a send-prefix
|
||||||
|
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# Open new split at cwd of current split
|
||||||
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
|
bind - split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# Use vim keybindings in copy mode
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
|
||||||
|
# v in copy mode starts making selection
|
||||||
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
||||||
|
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
||||||
|
|
||||||
|
# Escape turns on copy mode
|
||||||
|
bind Escape copy-mode
|
||||||
|
|
||||||
|
set-option -g status-position top
|
||||||
|
|
||||||
|
# make Prefix p paste the buffer.
|
||||||
|
unbind p
|
||||||
|
bind p paste-buffer
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
310
modules/home/common/waybar.nix
Normal file
310
modules/home/common/waybar.nix
Normal file
|
|
@ -0,0 +1,310 @@
|
||||||
|
{ self, config, lib, ... }:
|
||||||
|
let
|
||||||
|
generateIcons = n: lib.concatStringsSep " " (builtins.map (x: "{icon" + toString x + "}") (lib.range 0 (n - 1)));
|
||||||
|
modulesLeft = [
|
||||||
|
"custom/outer-left-arrow-dark"
|
||||||
|
"mpris"
|
||||||
|
"custom/left-arrow-light"
|
||||||
|
"network"
|
||||||
|
"custom/vpn"
|
||||||
|
"custom/left-arrow-dark"
|
||||||
|
"pulseaudio"
|
||||||
|
"custom/left-arrow-light"
|
||||||
|
];
|
||||||
|
modulesRight = [
|
||||||
|
"custom/left-arrow-dark"
|
||||||
|
"group/hardware"
|
||||||
|
"custom/left-arrow-light"
|
||||||
|
"clock#2"
|
||||||
|
"custom/left-arrow-dark"
|
||||||
|
"clock#1"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems = {
|
||||||
|
modules.waybar = lib.mkEnableOption "waybar settings";
|
||||||
|
cpuCount = lib.mkOption {
|
||||||
|
type = lib.types.int;
|
||||||
|
default = 8;
|
||||||
|
};
|
||||||
|
temperatureHwmon = {
|
||||||
|
isAbsolutePath = lib.mkEnableOption "absolute temperature path";
|
||||||
|
path = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
input-filename = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
waybarModules = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = modulesLeft ++ [
|
||||||
|
"custom/pseudobat"
|
||||||
|
] ++ modulesRight;
|
||||||
|
};
|
||||||
|
cpuString = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = generateIcons config.swarselsystems.cpuCount;
|
||||||
|
description = "The generated icons string for use by Waybar.";
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.waybar {
|
||||||
|
swarselsystems = {
|
||||||
|
waybarModules = lib.mkIf config.swarselsystems.isLaptop (modulesLeft ++ [
|
||||||
|
"battery"
|
||||||
|
] ++ modulesRight);
|
||||||
|
};
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
target = "sway-sessions.target";
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
ipc = true;
|
||||||
|
id = "bar-0";
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
modules-left = [ "sway/workspaces" "custom/outer-right-arrow-dark" "sway/window" ];
|
||||||
|
modules-center = [ "sway/mode" "privacy" "custom/github" "custom/configwarn" "custom/nix-updates" ];
|
||||||
|
"sway/mode" = {
|
||||||
|
format = "<span style=\"italic\" font-weight=\"bold\">{}</span>";
|
||||||
|
};
|
||||||
|
|
||||||
|
modules-right = config.swarselsystems.waybarModules;
|
||||||
|
|
||||||
|
"custom/pseudobat" = lib.mkIf (!config.swarselsystems.isLaptop) {
|
||||||
|
format = "";
|
||||||
|
on-click-right = "wlogout -p layer-shell";
|
||||||
|
};
|
||||||
|
|
||||||
|
"custom/configwarn" = {
|
||||||
|
exec = "waybarupdate";
|
||||||
|
interval = 60;
|
||||||
|
};
|
||||||
|
|
||||||
|
"custom/scratchpad-indicator" = {
|
||||||
|
interval = 3;
|
||||||
|
exec = "swaymsg -t get_tree | jq 'recurse(.nodes[]) | first(select(.name==\"__i3_scratch\")) | .floating_nodes | length | select(. >= 1)'";
|
||||||
|
format = "{} ";
|
||||||
|
on-click = "swaymsg 'scratchpad show'";
|
||||||
|
on-click-right = "swaymsg 'move scratchpad'";
|
||||||
|
};
|
||||||
|
|
||||||
|
"custom/github" = {
|
||||||
|
format = "{} ";
|
||||||
|
return-type = "json";
|
||||||
|
interval = 60;
|
||||||
|
exec = "github-notifications";
|
||||||
|
on-click = "xdg-open https://github.com/notifications";
|
||||||
|
};
|
||||||
|
|
||||||
|
idle_inhibitor = {
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
activated = "";
|
||||||
|
deactivated = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/hardware" = {
|
||||||
|
orientation = "inherit";
|
||||||
|
drawer = {
|
||||||
|
"transition-left-to-right" = false;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
"tray"
|
||||||
|
"temperature"
|
||||||
|
"power-profiles-daemon"
|
||||||
|
"custom/left-arrow-light"
|
||||||
|
"custom/left-arrow-dark"
|
||||||
|
"custom/scratchpad-indicator"
|
||||||
|
"custom/left-arrow-light"
|
||||||
|
"disk"
|
||||||
|
"custom/left-arrow-dark"
|
||||||
|
"memory"
|
||||||
|
"custom/left-arrow-light"
|
||||||
|
"cpu"
|
||||||
|
"custom/left-arrow-dark"
|
||||||
|
"backlight/slider"
|
||||||
|
"idle_inhibitor"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"backlight/slider" = {
|
||||||
|
min = 0;
|
||||||
|
max = 100;
|
||||||
|
orientation = "horizontal";
|
||||||
|
device = "intel_backlight";
|
||||||
|
};
|
||||||
|
|
||||||
|
power-profiles-daemon = {
|
||||||
|
format = "{icon}";
|
||||||
|
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||||
|
tooltip = true;
|
||||||
|
format-icons = {
|
||||||
|
"default" = "";
|
||||||
|
"performance" = "";
|
||||||
|
"balanced" = "";
|
||||||
|
"power-saver" = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
temperature = {
|
||||||
|
hwmon-path = lib.mkIf (!config.swarselsystems.temperatureHwmon.isAbsolutePath) config.swarselsystems.temperatureHwmon.path;
|
||||||
|
hwmon-path-abs = lib.mkIf config.swarselsystems.temperatureHwmon.isAbsolutePath config.swarselsystems.temperatureHwmon.path;
|
||||||
|
input-filename = lib.mkIf config.swarselsystems.temperatureHwmon.isAbsolutePath config.swarselsystems.temperatureHwmon.input-filename;
|
||||||
|
critical-threshold = 80;
|
||||||
|
format-critical = " {temperatureC}°C";
|
||||||
|
format = " {temperatureC}°C";
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
mpris = {
|
||||||
|
format = "{player_icon} {title} <small>[{position}/{length}]</small>";
|
||||||
|
format-paused = "{player_icon} <i>{title} <small>[{position}/{length}]</small></i>";
|
||||||
|
player-icons = {
|
||||||
|
"default" = "▶ ";
|
||||||
|
"mpv" = "🎵 ";
|
||||||
|
"spotify" = " ";
|
||||||
|
};
|
||||||
|
status-icons = {
|
||||||
|
"paused" = " ";
|
||||||
|
};
|
||||||
|
interval = 1;
|
||||||
|
title-len = 20;
|
||||||
|
artist-len = 20;
|
||||||
|
album-len = 10;
|
||||||
|
};
|
||||||
|
"custom/left-arrow-dark" = {
|
||||||
|
format = "";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
"custom/outer-left-arrow-dark" = {
|
||||||
|
format = "";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
"custom/left-arrow-light" = {
|
||||||
|
format = "";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
"custom/right-arrow-dark" = {
|
||||||
|
format = "";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
"custom/outer-right-arrow-dark" = {
|
||||||
|
format = "";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
"custom/right-arrow-light" = {
|
||||||
|
format = "";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
"sway/workspaces" = {
|
||||||
|
disable-scroll = true;
|
||||||
|
format = "{name}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"clock#1" = {
|
||||||
|
min-length = 8;
|
||||||
|
interval = 1;
|
||||||
|
format = "{:%H:%M:%S}";
|
||||||
|
# on-click-right= "gnome-clocks";
|
||||||
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||||
|
};
|
||||||
|
|
||||||
|
"clock#2" = {
|
||||||
|
format = "{:%d. %B %Y}";
|
||||||
|
# on-click-right= "gnome-clocks";
|
||||||
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
||||||
|
};
|
||||||
|
|
||||||
|
pulseaudio = {
|
||||||
|
format = "{icon} {volume:2}%";
|
||||||
|
format-bluetooth = "{icon} {volume}%";
|
||||||
|
format-muted = "MUTE";
|
||||||
|
format-icons = {
|
||||||
|
headphones = "";
|
||||||
|
default = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
|
};
|
||||||
|
scroll-step = 1;
|
||||||
|
on-click = "pamixer -t";
|
||||||
|
on-click-right = "pavucontrol";
|
||||||
|
};
|
||||||
|
|
||||||
|
memory = {
|
||||||
|
interval = 5;
|
||||||
|
format = " {}%";
|
||||||
|
tooltip-format = "Memory: {used:0.1f}G/{total:0.1f}G\nSwap: {swapUsed}G/{swapTotal}G";
|
||||||
|
};
|
||||||
|
cpu = {
|
||||||
|
format = config.swarselsystems.cpuString;
|
||||||
|
min-length = 6;
|
||||||
|
interval = 5;
|
||||||
|
format-icons = [ "▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" ];
|
||||||
|
# on-click-right= "com.github.stsdc.monitor";
|
||||||
|
on-click-right = "kitty -o confirm_os_window_close=0 btm";
|
||||||
|
|
||||||
|
};
|
||||||
|
"custom/vpn" = {
|
||||||
|
format = "()";
|
||||||
|
exec = "echo '{\"class\": \"connected\"}'";
|
||||||
|
exec-if = "test -d /proc/sys/net/ipv4/conf/tun0";
|
||||||
|
return-type = "json";
|
||||||
|
interval = 5;
|
||||||
|
};
|
||||||
|
battery = {
|
||||||
|
states = {
|
||||||
|
"warning" = 60;
|
||||||
|
"error" = 30;
|
||||||
|
"critical" = 15;
|
||||||
|
};
|
||||||
|
interval = 5;
|
||||||
|
format = "{icon} {capacity}%";
|
||||||
|
format-charging = "{capacity}% ";
|
||||||
|
format-plugged = "{capacity}% ";
|
||||||
|
format-icons = [
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
""
|
||||||
|
];
|
||||||
|
on-click-right = "wlogout -p layer-shell";
|
||||||
|
};
|
||||||
|
disk = {
|
||||||
|
interval = 30;
|
||||||
|
format = "Disk {percentage_used:2}%";
|
||||||
|
path = "/";
|
||||||
|
states = {
|
||||||
|
"warning" = 80;
|
||||||
|
"critical" = 90;
|
||||||
|
};
|
||||||
|
tooltip-format = "{used} used out of {total} on {path} ({percentage_used}%)\n{free} free on {path} ({percentage_free}%)";
|
||||||
|
};
|
||||||
|
tray = {
|
||||||
|
icon-size = 20;
|
||||||
|
};
|
||||||
|
network = {
|
||||||
|
interval = 5;
|
||||||
|
format-wifi = "{signalStrength}% ";
|
||||||
|
format-ethernet = "";
|
||||||
|
format-linked = "{ifname} (No IP) ";
|
||||||
|
format-disconnected = "Disconnected ⚠";
|
||||||
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||||
|
tooltip-format-ethernet = "{ifname} via {gwaddr}: {essid} {ipaddr}/{cidr}\n\n⇡{bandwidthUpBytes} ⇣{bandwidthDownBytes}";
|
||||||
|
tooltip-format-wifi = "{ifname} via {gwaddr}: {essid} {ipaddr}/{cidr} \n{signaldBm}dBm @ {frequency}MHz\n\n⇡{bandwidthUpBytes} ⇣{bandwidthDownBytes}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
style = builtins.readFile (self + /programs/waybar/style.css);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
32
modules/home/common/yubikey-touch-detector.nix
Normal file
32
modules/home/common/yubikey-touch-detector.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.yubikeytouch = lib.mkEnableOption "yubikey touch detector service settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.yubikeytouch {
|
||||||
|
systemd.user.services.yubikey-touch-detector = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Detects when your YubiKey is waiting for a touch";
|
||||||
|
Requires = [ "yubikey-touch-detector.socket" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${pkgs.yubikey-touch-detector}/bin/yubikey-touch-detector --libnotify";
|
||||||
|
EnvironmentFile = "-%E/yubikey-touch-detector/service.conf";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
Also = [ "yubikey-touch-detector.socket" ];
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.sockets.yubikey-touch-detector = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Unix socket activation for YubiKey touch detector service";
|
||||||
|
};
|
||||||
|
Socket = {
|
||||||
|
ListenStream = "%t/yubikey-touch-detector.socket";
|
||||||
|
RemoveOnStop = true;
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "sockets.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
modules/home/common/yubikey.nix
Normal file
17
modules/home/common/yubikey.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib, config, nix-secrets, ... }:
|
||||||
|
let
|
||||||
|
secretsDirectory = builtins.toString nix-secrets;
|
||||||
|
yubikey1 = lib.swarselsystems.getSecret "${secretsDirectory}/yubikey/yubikey1";
|
||||||
|
yubikey2 = lib.swarselsystems.getSecret "${secretsDirectory}/yubikey/yubikey2";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.yubikey = lib.mkEnableOption "yubikey settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.yubikey {
|
||||||
|
pam.yubico.authorizedYubiKeys = {
|
||||||
|
ids = [
|
||||||
|
"${yubikey1}"
|
||||||
|
"${yubikey2}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
20
modules/home/common/zellij.nix
Normal file
20
modules/home/common/zellij.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ self, lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.zellij = lib.mkEnableOption "zellij settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.zellij {
|
||||||
|
programs.zellij = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
zjstatus
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"zellij/config.kdl".text = import "${self}/programs/zellij/config.kdl.nix" { inherit config; };
|
||||||
|
"zellij/layouts/default.kdl".text = import "${self}/programs/zellij/layouts/default.kdl.nix" { inherit config pkgs; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
118
modules/home/common/zsh.nix
Normal file
118
modules/home/common/zsh.nix
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.swarselsystems) flakePath;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems = {
|
||||||
|
modules.zsh = lib.mkEnableOption "zsh settings";
|
||||||
|
shellAliases = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
default = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.zsh {
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
shellAliases = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
hg = "history | grep";
|
||||||
|
hmswitch = "home-manager --flake ${flakePath}#$(whoami)@$(hostname) switch |& nom";
|
||||||
|
nswitch = "sudo nixos-rebuild --flake ${flakePath}#$(hostname) --show-trace --log-format internal-json -v switch |& nom --json";
|
||||||
|
nboot = "sudo nixos-rebuild --flake ${flakePath}#$(hostname) --show-trace --log-format internal-json -v boot |& nom --json";
|
||||||
|
magit = "emacsclient -nc -e \"(magit-status)\"";
|
||||||
|
config = "git --git-dir=$HOME/.cfg/ --work-tree=$HOME";
|
||||||
|
g = "git";
|
||||||
|
c = "git --git-dir=$FLAKE/.git --work-tree=$FLAKE/";
|
||||||
|
passpush = "cd ~/.local/share/password-store; git add .; git commit -m 'pass file changes'; git push; cd -;";
|
||||||
|
passpull = "cd ~/.local/share/password-store; git pull; cd -;";
|
||||||
|
hotspot = "nmcli connection up local; nmcli device wifi hotspot;";
|
||||||
|
cd = "z";
|
||||||
|
youtube-dl = "yt-dlp";
|
||||||
|
cd-orig = "cd";
|
||||||
|
cat-orig = "cat";
|
||||||
|
cdr = "cd \"$( (find $DOCUMENT_DIR_WORK $DOCUMENT_DIR_PRIV -maxdepth 1 && echo $FLAKE) | fzf )\"";
|
||||||
|
nix-ldd-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd";
|
||||||
|
nix-ldd = "LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH ldd";
|
||||||
|
nix-ldd-locate = "nix-locate --minimal --top-level -w ";
|
||||||
|
nix-store-search = "ls /nix/store | grep";
|
||||||
|
fs-diff = "sudo mount -o subvol=/ /dev/mapper/cryptroot /mnt ; fs-diff";
|
||||||
|
lt = "eza -las modified --total-size";
|
||||||
|
boot-diff = "nix store diff-closures /run/*-system";
|
||||||
|
gen-diff = "nix profile diff-closures --profile /nix/var/nix/profiles/system";
|
||||||
|
cc = "wl-copy";
|
||||||
|
}
|
||||||
|
config.swarselsystems.shellAliases;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
autocd = false;
|
||||||
|
cdpath = [
|
||||||
|
"~/.dotfiles"
|
||||||
|
# "~/Documents/GitHub"
|
||||||
|
];
|
||||||
|
defaultKeymap = "emacs";
|
||||||
|
dirHashes = {
|
||||||
|
dl = "$HOME/Downloads";
|
||||||
|
gh = "$HOME/Documents/GitHub";
|
||||||
|
};
|
||||||
|
history = {
|
||||||
|
expireDuplicatesFirst = true;
|
||||||
|
path = "$HOME/.histfile";
|
||||||
|
save = 100000;
|
||||||
|
size = 100000;
|
||||||
|
};
|
||||||
|
historySubstringSearch = {
|
||||||
|
enable = true;
|
||||||
|
searchDownKey = "^[OB";
|
||||||
|
searchUpKey = "^[OA";
|
||||||
|
};
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "fzf-tab";
|
||||||
|
src = pkgs.zsh-fzf-tab;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
initExtra = ''
|
||||||
|
my-forward-word() {
|
||||||
|
local WORDCHARS=$WORDCHARS
|
||||||
|
WORDCHARS="''${WORDCHARS//:}"
|
||||||
|
WORDCHARS="''${WORDCHARS//\/}"
|
||||||
|
WORDCHARS="''${WORDCHARS//.}"
|
||||||
|
zle forward-word
|
||||||
|
}
|
||||||
|
zle -N my-forward-word
|
||||||
|
# ctrl + right
|
||||||
|
bindkey "^[[1;5C" my-forward-word
|
||||||
|
|
||||||
|
# shift + right
|
||||||
|
bindkey "^[[1;2C" forward-word
|
||||||
|
|
||||||
|
my-backward-word() {
|
||||||
|
local WORDCHARS=$WORDCHARS
|
||||||
|
WORDCHARS="''${WORDCHARS//:}"
|
||||||
|
WORDCHARS="''${WORDCHARS//\/}"
|
||||||
|
WORDCHARS="''${WORDCHARS//.}"
|
||||||
|
zle backward-word
|
||||||
|
}
|
||||||
|
zle -N my-backward-word
|
||||||
|
# ctrl + left
|
||||||
|
bindkey "^[[1;5D" my-backward-word
|
||||||
|
|
||||||
|
# shift + left
|
||||||
|
bindkey "^[[1;2D" backward-word
|
||||||
|
|
||||||
|
my-backward-delete-word() {
|
||||||
|
local WORDCHARS=$WORDCHARS
|
||||||
|
WORDCHARS="''${WORDCHARS//:}"
|
||||||
|
WORDCHARS="''${WORDCHARS//\/}"
|
||||||
|
WORDCHARS="''${WORDCHARS//.}"
|
||||||
|
zle backward-delete-word
|
||||||
|
}
|
||||||
|
zle -N my-backward-delete-word
|
||||||
|
# ctrl + del
|
||||||
|
bindkey '^H' my-backward-delete-word
|
||||||
|
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
let
|
|
||||||
moduleNames = lib.swarselsystems.readNix "modules/home";
|
|
||||||
in
|
|
||||||
lib.swarselsystems.mkModules moduleNames "home"
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
isBtrfs = lib.mkEnableOption "use btrfs filesystem";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
cpuCount = lib.mkOption {
|
|
||||||
type = lib.types.int;
|
|
||||||
default = 8;
|
|
||||||
};
|
|
||||||
isSecondaryGpu = lib.mkEnableOption "device has a secondary GPU";
|
|
||||||
SecondaryGpuCard = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
temperatureHwmon = {
|
|
||||||
isAbsolutePath = lib.mkEnableOption "absolute temperature path";
|
|
||||||
path = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
input-filename = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
inputs = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
kyria = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
|
||||||
default = {
|
|
||||||
"36125:53060:splitkb.com_splitkb.com_Kyria_rev3" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
"7504:24926:Kyria_Keyboard" = {
|
|
||||||
xkb_layout = "us";
|
|
||||||
xkb_variant = "altgr-intl";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
touchpad = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
standardinputs = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
|
||||||
default = lib.recursiveUpdate (lib.recursiveUpdate config.swarselsystems.touchpad config.swarselsystems.kyria) config.swarselsystems.inputs;
|
|
||||||
internal = true;
|
|
||||||
};
|
|
||||||
keybindings = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf lib.types.str;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
shellAliases = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf lib.types.str;
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
isLaptop = lib.mkEnableOption "laptop host";
|
|
||||||
};
|
|
||||||
|
|
||||||
config.swarselsystems = {
|
|
||||||
touchpad = lib.mkIf config.swarselsystems.isLaptop {
|
|
||||||
"type:touchpad" = {
|
|
||||||
dwt = "enabled";
|
|
||||||
tap = "enabled";
|
|
||||||
natural_scroll = "enabled";
|
|
||||||
middle_emulation = "enabled";
|
|
||||||
drag_lock = "disabled";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
waybarModules = lib.mkIf config.swarselsystems.isLaptop [
|
|
||||||
"custom/outer-left-arrow-dark"
|
|
||||||
"mpris"
|
|
||||||
"custom/left-arrow-light"
|
|
||||||
"network"
|
|
||||||
"custom/vpn"
|
|
||||||
"custom/left-arrow-dark"
|
|
||||||
"pulseaudio"
|
|
||||||
"custom/left-arrow-light"
|
|
||||||
"battery"
|
|
||||||
"custom/left-arrow-dark"
|
|
||||||
"group/hardware"
|
|
||||||
"custom/left-arrow-light"
|
|
||||||
"clock#2"
|
|
||||||
"custom/left-arrow-dark"
|
|
||||||
"clock#1"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
monitors = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.attrsOf lib.types.str);
|
|
||||||
default = { };
|
|
||||||
};
|
|
||||||
sharescreen = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
lowResolution = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
highResolution = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
isNixos = lib.mkEnableOption "nixos host";
|
|
||||||
isPublic = lib.mkEnableOption "is a public machine (no secrets)";
|
|
||||||
swayfxConfig = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "
|
|
||||||
blur enable
|
|
||||||
blur_xray disable
|
|
||||||
blur_passes 1
|
|
||||||
blur_radius 1
|
|
||||||
shadows enable
|
|
||||||
corner_radius 2
|
|
||||||
titlebar_separator disable
|
|
||||||
default_dim_inactive 0.02
|
|
||||||
";
|
|
||||||
internal = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.swarselsystems = {
|
|
||||||
startup = lib.mkIf (!config.swarselsystems.isNixos) [
|
|
||||||
{ command = "sleep 60 && nixGL nextcloud --background"; }
|
|
||||||
{ command = "sleep 60 && nixGL vesktop --start-minimized -enable-features=UseOzonePlatform -ozone-platform=wayland"; }
|
|
||||||
{ command = "sleep 60 && nixGL syncthingtray --wait"; }
|
|
||||||
{ command = "sleep 60 && ANKI_WAYLAND=1 nixGL anki"; }
|
|
||||||
{ command = "nm-applet --indicator"; }
|
|
||||||
{ command = "sleep 60 && OBSIDIAN_USE_WAYLAND=1 nixGL obsidian -enable-features=UseOzonePlatform -ozone-platform=wayland"; }
|
|
||||||
{ command = "sleep 60 && element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
|
||||||
];
|
|
||||||
swayfxConfig = lib.mkIf (!config.swarselsystems.isNixos) " ";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
7
modules/home/optional/default.nix
Normal file
7
modules/home/optional/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
importNames = lib.swarselsystems.readNix "modules/home/optional";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = lib.swarselsystems.mkImports importNames "modules/home/optional";
|
||||||
|
}
|
||||||
14
modules/home/optional/framework.nix
Normal file
14
modules/home/optional/framework.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.optional.framework = lib.mkEnableOption "optional framework machine settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.optional.framework {
|
||||||
|
swarselsystems = {
|
||||||
|
inputs = {
|
||||||
|
"12972:18:Framework_Laptop_16_Keyboard_Module_-_ANSI_Keyboard" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
39
modules/home/optional/gaming.nix
Normal file
39
modules/home/optional/gaming.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.optional.gaming = lib.mkEnableOption "optional gaming settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.optional.gaming {
|
||||||
|
# specialisation = {
|
||||||
|
# gaming.configuration = {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
lutris
|
||||||
|
wine
|
||||||
|
protonplus
|
||||||
|
winetricks
|
||||||
|
libudev-zero
|
||||||
|
dwarfs
|
||||||
|
fuse-overlayfs
|
||||||
|
# steam
|
||||||
|
steam-run
|
||||||
|
patchelf
|
||||||
|
gamescope
|
||||||
|
vulkan-tools
|
||||||
|
moonlight-qt
|
||||||
|
ns-usbloader
|
||||||
|
|
||||||
|
quark-goldleaf
|
||||||
|
|
||||||
|
# gog games installing
|
||||||
|
heroic
|
||||||
|
|
||||||
|
# minecraft
|
||||||
|
prismlauncher # has overrides
|
||||||
|
temurin-bin-17
|
||||||
|
|
||||||
|
pokefinder
|
||||||
|
retroarch
|
||||||
|
flips
|
||||||
|
];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
||||||
430
modules/home/optional/work.nix
Normal file
430
modules/home/optional/work.nix
Normal file
|
|
@ -0,0 +1,430 @@
|
||||||
|
{ self, config, pkgs, lib, nix-secrets, ... }:
|
||||||
|
let
|
||||||
|
inherit (config.swarselsystems) homeDir;
|
||||||
|
secretsDirectory = builtins.toString nix-secrets;
|
||||||
|
dcUser = lib.swarselsystems.getSecret "${secretsDirectory}/work/dc-user";
|
||||||
|
clUser = lib.swarselsystems.getSecret "${secretsDirectory}/work/cl-user";
|
||||||
|
wsUser = lib.swarselsystems.getSecret "${secretsDirectory}/work/ws-user";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.optional.work = lib.mkEnableOption "optional work settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.optional.work {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
stable.teams-for-linux
|
||||||
|
shellcheck
|
||||||
|
dig
|
||||||
|
docker
|
||||||
|
postman
|
||||||
|
rclone
|
||||||
|
stable.awscli2
|
||||||
|
libguestfs-with-appliance
|
||||||
|
stable.prometheus.cli
|
||||||
|
tigervnc
|
||||||
|
openstackclient
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
DOCUMENT_DIR_PRIV = lib.mkForce "${homeDir}/Documents/Private";
|
||||||
|
DOCUMENT_DIR_WORK = lib.mkForce "${homeDir}/Documents/Work";
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.sway.config = {
|
||||||
|
output = {
|
||||||
|
"Applied Creative Technology Transmitter QUATTRO201811" = {
|
||||||
|
bg = "${self}/wallpaper/navidrome.png ${config.stylix.imageScalingMode}";
|
||||||
|
};
|
||||||
|
"Hewlett Packard HP Z24i CN44250RDT" = {
|
||||||
|
bg = "${self}/wallpaper/op6wp.png ${config.stylix.imageScalingMode}";
|
||||||
|
};
|
||||||
|
"HP Inc. HP 732pk CNC4080YL5" = {
|
||||||
|
bg = "${self}/wallpaper/botanicswp.png ${config.stylix.imageScalingMode}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
stylix.targets.firefox.profileNames = [
|
||||||
|
"dc"
|
||||||
|
"cl"
|
||||||
|
"ws"
|
||||||
|
"work"
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
git.userEmail = lib.swarselsystems.getSecret "${secretsDirectory}/work/git-email";
|
||||||
|
|
||||||
|
zsh = {
|
||||||
|
shellAliases = {
|
||||||
|
dssh = "ssh -l ${dcUser}";
|
||||||
|
cssh = "ssh -l ${clUser}";
|
||||||
|
wssh = "ssh -l ${wsUser}";
|
||||||
|
};
|
||||||
|
cdpath = [
|
||||||
|
"~/Documents/Work"
|
||||||
|
];
|
||||||
|
dirHashes = {
|
||||||
|
d = "$HOME/.dotfiles";
|
||||||
|
w = "$HOME/Documents/Work";
|
||||||
|
s = "$HOME/.dotfiles/secrets";
|
||||||
|
pr = "$HOME/Documents/Private";
|
||||||
|
ac = "$HOME/.ansible/collections/ansible_collections/vbc/linux/roles";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ssh = {
|
||||||
|
matchBlocks = {
|
||||||
|
"uc" = {
|
||||||
|
hostname = lib.swarselsystems.getSecret "${secretsDirectory}/work/uc-prod";
|
||||||
|
user = "stack";
|
||||||
|
};
|
||||||
|
"uc.stg" = {
|
||||||
|
hostname = lib.swarselsystems.getSecret "${secretsDirectory}/work/uc-stg";
|
||||||
|
user = "stack";
|
||||||
|
};
|
||||||
|
"uc.staging" = {
|
||||||
|
hostname = lib.swarselsystems.getSecret "${secretsDirectory}/work/uc-stg";
|
||||||
|
user = "stack";
|
||||||
|
};
|
||||||
|
"uc.dev" = {
|
||||||
|
hostname = lib.swarselsystems.getSecret "${secretsDirectory}/work/uc-dev";
|
||||||
|
user = "stack";
|
||||||
|
};
|
||||||
|
"cbe" = {
|
||||||
|
hostname = lib.swarselsystems.getSecret "${secretsDirectory}/work/cbe-prod";
|
||||||
|
user = dcUser;
|
||||||
|
};
|
||||||
|
"cbe.stg" = {
|
||||||
|
hostname = lib.swarselsystems.getSecret "${secretsDirectory}/work/cbe-stg";
|
||||||
|
user = dcUser;
|
||||||
|
};
|
||||||
|
"cbe.staging" = {
|
||||||
|
hostname = lib.swarselsystems.getSecret "${secretsDirectory}/work/cbe-stg";
|
||||||
|
user = dcUser;
|
||||||
|
};
|
||||||
|
"*.vbc.ac.at" = {
|
||||||
|
user = dcUser;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
firefox = {
|
||||||
|
profiles =
|
||||||
|
let
|
||||||
|
isDefault = false;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
dc = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
inherit isDefault;
|
||||||
|
id = 1;
|
||||||
|
settings = {
|
||||||
|
"browser.startup.homepage" = "https://tower.vbc.ac.at|https://artifactory.vbc.ac.at";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
config.swarselsystems.firefox;
|
||||||
|
cl = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
inherit isDefault;
|
||||||
|
id = 2;
|
||||||
|
settings = {
|
||||||
|
"browser.startup.homepage" = "https://portal.azure.com";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
config.swarselsystems.firefox;
|
||||||
|
ws = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
inherit isDefault;
|
||||||
|
id = 3;
|
||||||
|
}
|
||||||
|
config.swarselsystems.firefox;
|
||||||
|
work = lib.recursiveUpdate
|
||||||
|
{
|
||||||
|
inherit isDefault;
|
||||||
|
id = 4;
|
||||||
|
settings = {
|
||||||
|
"browser.startup.homepage" = "https://outlook.office.com|https://satellite.vbc.ac.at|https://bitbucket.vbc.ac.at|https://github.com";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
config.swarselsystems.firefox;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
chromium = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.chromium;
|
||||||
|
|
||||||
|
extensions = [
|
||||||
|
# 1password
|
||||||
|
"gejiddohjgogedgjnonbofjigllpkmbf"
|
||||||
|
# dark reader
|
||||||
|
"eimadpbcbfnmbkopoojfekhnkhdbieeh"
|
||||||
|
# ublock origin
|
||||||
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm"
|
||||||
|
# i still dont care about cookies
|
||||||
|
"edibdbjcniadpccecjdfdjjppcpchdlm"
|
||||||
|
# browserpass
|
||||||
|
"naepdomgkenhinolocfifgehidddafch"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
kanshi = {
|
||||||
|
settings = [
|
||||||
|
{
|
||||||
|
# seminary room
|
||||||
|
output = {
|
||||||
|
criteria = "Applied Creative Technology Transmitter QUATTRO201811";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "1280x720";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# work main screen
|
||||||
|
output = {
|
||||||
|
criteria = "HP Inc. HP 732pk CNC4080YL5";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "3840x2160";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# work side screen
|
||||||
|
output = {
|
||||||
|
criteria = "Hewlett Packard HP Z24i CN44250RDT";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "1920x1200";
|
||||||
|
transform = "270";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "lidopen";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = config.swarselsystems.sharescreen;
|
||||||
|
status = "enable";
|
||||||
|
scale = 1.5;
|
||||||
|
position = "1462,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "HP Inc. HP 732pk CNC4080YL5";
|
||||||
|
scale = 1.4;
|
||||||
|
mode = "3840x2160";
|
||||||
|
position = "-1280,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Hewlett Packard HP Z24i CN44250RDT";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "1920x1200";
|
||||||
|
transform = "90";
|
||||||
|
position = "-2480,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "lidopen";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = config.swarselsystems.sharescreen;
|
||||||
|
status = "enable";
|
||||||
|
scale = 1.7;
|
||||||
|
position = "2560,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Applied Creative Technology Transmitter QUATTRO201811";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "1280x720";
|
||||||
|
position = "10000,10000";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "lidclosed";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = config.swarselsystems.sharescreen;
|
||||||
|
status = "disable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "HP Inc. HP 732pk CNC4080YL5";
|
||||||
|
scale = 1.4;
|
||||||
|
mode = "3840x2160";
|
||||||
|
position = "-1280,0";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Hewlett Packard HP Z24i CN44250RDT";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "1920x1200";
|
||||||
|
transform = "270";
|
||||||
|
position = "-2480,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "lidclosed";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = config.swarselsystems.sharescreen;
|
||||||
|
status = "disable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Applied Creative Technology Transmitter QUATTRO201811";
|
||||||
|
scale = 1.0;
|
||||||
|
mode = "1280x720";
|
||||||
|
position = "10000,10000";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
mimeApps = {
|
||||||
|
defaultApplications = {
|
||||||
|
"x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
desktopEntries =
|
||||||
|
let
|
||||||
|
terminal = false;
|
||||||
|
categories = [ "Application" ];
|
||||||
|
icon = "firefox";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
firefox_work = {
|
||||||
|
name = "Firefox (work)";
|
||||||
|
genericName = "Firefox work";
|
||||||
|
exec = "firefox -p work";
|
||||||
|
inherit terminal categories icon;
|
||||||
|
};
|
||||||
|
firefox_dc = {
|
||||||
|
name = "Firefox (dc)";
|
||||||
|
genericName = "Firefox dc";
|
||||||
|
exec = "firefox -p dc";
|
||||||
|
inherit terminal categories icon;
|
||||||
|
};
|
||||||
|
|
||||||
|
firefox_ws = {
|
||||||
|
name = "Firefox (ws)";
|
||||||
|
genericName = "Firefox ws";
|
||||||
|
exec = "firefox -p ws";
|
||||||
|
inherit terminal categories icon;
|
||||||
|
};
|
||||||
|
|
||||||
|
firefox_cl = {
|
||||||
|
name = "Firefox (cl)";
|
||||||
|
genericName = "Firefox cl";
|
||||||
|
exec = "firefox -p cl";
|
||||||
|
inherit terminal categories icon;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
swarselsystems = {
|
||||||
|
startup = [
|
||||||
|
{ command = "teams-for-linux"; }
|
||||||
|
{ command = "1password"; }
|
||||||
|
];
|
||||||
|
monitors = {
|
||||||
|
main = {
|
||||||
|
name = "BOE 0x0BC9 Unknown";
|
||||||
|
mode = "2560x1600"; # TEMPLATE
|
||||||
|
scale = "1";
|
||||||
|
position = "2560,0";
|
||||||
|
workspace = "15:L";
|
||||||
|
output = "eDP-2";
|
||||||
|
};
|
||||||
|
homedesktop = {
|
||||||
|
name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
|
||||||
|
mode = "2560x1440";
|
||||||
|
scale = "1";
|
||||||
|
position = "0,0";
|
||||||
|
workspace = "1:一";
|
||||||
|
output = "DP-11";
|
||||||
|
};
|
||||||
|
work_back_middle = {
|
||||||
|
name = "LG Electronics LG Ultra HD 0x000305A6";
|
||||||
|
mode = "2560x1440";
|
||||||
|
scale = "1";
|
||||||
|
position = "5120,0";
|
||||||
|
workspace = "1:一";
|
||||||
|
output = "DP-10";
|
||||||
|
};
|
||||||
|
work_front_left = {
|
||||||
|
name = "LG Electronics LG Ultra HD 0x0007AB45";
|
||||||
|
mode = "3840x2160";
|
||||||
|
scale = "1";
|
||||||
|
position = "5120,0";
|
||||||
|
workspace = "1:一";
|
||||||
|
output = "DP-7";
|
||||||
|
};
|
||||||
|
work_back_right = {
|
||||||
|
name = "HP Inc. HP Z32 CN41212T55";
|
||||||
|
mode = "3840x2160";
|
||||||
|
scale = "1";
|
||||||
|
position = "5120,0";
|
||||||
|
workspace = "1:一";
|
||||||
|
output = "DP-3";
|
||||||
|
};
|
||||||
|
work_middle_middle_main = {
|
||||||
|
name = "HP Inc. HP 732pk CNC4080YL5";
|
||||||
|
mode = "3840x2160";
|
||||||
|
scale = "1";
|
||||||
|
position = "-1280,0";
|
||||||
|
workspace = "11:M";
|
||||||
|
output = "DP-8";
|
||||||
|
};
|
||||||
|
work_middle_middle_side = {
|
||||||
|
name = "Hewlett Packard HP Z24i CN44250RDT";
|
||||||
|
mode = "1920x1200";
|
||||||
|
transform = "270";
|
||||||
|
scale = "1";
|
||||||
|
position = "-2480,0";
|
||||||
|
workspace = "12:S";
|
||||||
|
output = "DP-9";
|
||||||
|
};
|
||||||
|
work_seminary = {
|
||||||
|
name = "Applied Creative Technology Transmitter QUATTRO201811";
|
||||||
|
mode = "1280x720";
|
||||||
|
scale = "1";
|
||||||
|
position = "10000,10000"; # i.e. this screen is inaccessible by moving the mouse
|
||||||
|
workspace = "14:T";
|
||||||
|
output = "DP-4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
inputs = {
|
||||||
|
"1133:45081:MX_Master_2S_Keyboard" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
};
|
||||||
|
# "2362:628:PIXA3854:00_093A:0274_Touchpad" = {
|
||||||
|
# dwt = "enabled";
|
||||||
|
# tap = "enabled";
|
||||||
|
# natural_scroll = "enabled";
|
||||||
|
# middle_emulation = "enabled";
|
||||||
|
# drag_lock = "disabled";
|
||||||
|
# };
|
||||||
|
"1133:50504:Logitech_USB_Receiver" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
};
|
||||||
|
"1133:45944:MX_KEYS_S" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keybindings = {
|
||||||
|
"Mod4+Ctrl+Shift+p" = "exec screenshare";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
11
modules/home/server/default.nix
Normal file
11
modules/home/server/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ self, lib, ... }:
|
||||||
|
let
|
||||||
|
importNames = lib.swarselsystems.readNix "modules/home/server";
|
||||||
|
modulesPath = "${self}/modules";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = lib.swarselsystems.mkImports importNames "modules/home/server" ++ [
|
||||||
|
"${modulesPath}/home/common/settings.nix"
|
||||||
|
"${modulesPath}/home/common/sharedsetup.nix"
|
||||||
|
];
|
||||||
|
}
|
||||||
12
modules/home/server/symlink.nix
Normal file
12
modules/home/server/symlink.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ self, lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.server.dotfiles = lib.mkEnableOption "server dotfiles settings";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.server.dotfiles {
|
||||||
|
home.file = {
|
||||||
|
"init.el" = lib.mkForce {
|
||||||
|
source = self + /programs/emacs/server.el;
|
||||||
|
target = ".emacs.d/init.el";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
isDarwin = lib.mkEnableOption "darwin host";
|
|
||||||
isLinux = lib.mkEnableOption "whether this is a linux machine";
|
|
||||||
mainUser = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "swarsel";
|
|
||||||
};
|
|
||||||
homeDir = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/home/swarsel";
|
|
||||||
};
|
|
||||||
xdgDir = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/run/user/1000";
|
|
||||||
};
|
|
||||||
flakePath = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/home/swarsel/.dotfiles";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
startup = lib.mkOption {
|
|
||||||
type = lib.types.listOf (lib.types.attrsOf lib.types.str);
|
|
||||||
default = [
|
|
||||||
{ command = "nextcloud --background"; }
|
|
||||||
{ command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
|
|
||||||
{ command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
|
|
||||||
{ command = "ANKI_WAYLAND=1 anki"; }
|
|
||||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
|
|
||||||
{ command = "nm-applet"; }
|
|
||||||
{ command = "feishin"; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
{ self, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
stylix = lib.mkOption {
|
|
||||||
type = lib.types.attrs;
|
|
||||||
default = {
|
|
||||||
enable = true;
|
|
||||||
base16Scheme = "${self}/programs/stylix/swarsel.yaml";
|
|
||||||
polarity = "dark";
|
|
||||||
opacity.popups = 0.5;
|
|
||||||
cursor = {
|
|
||||||
package = pkgs.banana-cursor;
|
|
||||||
# package = pkgs.capitaine-cursors;
|
|
||||||
name = "Banana";
|
|
||||||
# name = "capitaine-cursors";
|
|
||||||
size = 16;
|
|
||||||
};
|
|
||||||
fonts = {
|
|
||||||
sizes = {
|
|
||||||
terminal = 10;
|
|
||||||
applications = 11;
|
|
||||||
};
|
|
||||||
serif = {
|
|
||||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
|
||||||
package = pkgs.cantarell-fonts;
|
|
||||||
# package = pkgs.montserrat;
|
|
||||||
name = "Cantarell";
|
|
||||||
# name = "FiraCode Nerd Font Propo";
|
|
||||||
# name = "Montserrat";
|
|
||||||
};
|
|
||||||
sansSerif = {
|
|
||||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
|
||||||
package = pkgs.cantarell-fonts;
|
|
||||||
# package = pkgs.montserrat;
|
|
||||||
name = "Cantarell";
|
|
||||||
# name = "FiraCode Nerd Font Propo";
|
|
||||||
# name = "Montserrat";
|
|
||||||
};
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.nerd-fonts.fira-mono; # has overrides
|
|
||||||
name = "FiraCode Nerd Font Mono";
|
|
||||||
};
|
|
||||||
emoji = {
|
|
||||||
package = pkgs.noto-fonts-emoji;
|
|
||||||
name = "Noto Color Emoji";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
{ self, lib, ... }:
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
wallpaper = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = self + /wallpaper/lenovowp.png;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
let
|
|
||||||
generateIcons = n: lib.concatStringsSep " " (builtins.map (x: "{icon" + toString x + "}") (lib.range 0 (n - 1)));
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.swarselsystems = {
|
|
||||||
cpuString = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = generateIcons config.swarselsystems.cpuCount;
|
|
||||||
description = "The generated icons string for use by Waybar.";
|
|
||||||
internal = true;
|
|
||||||
};
|
|
||||||
waybarModules = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
default = [
|
|
||||||
"custom/outer-left-arrow-dark"
|
|
||||||
"mpris"
|
|
||||||
"custom/left-arrow-light"
|
|
||||||
"network"
|
|
||||||
"custom/vpn"
|
|
||||||
"custom/left-arrow-dark"
|
|
||||||
"pulseaudio"
|
|
||||||
"custom/left-arrow-light"
|
|
||||||
"custom/pseudobat"
|
|
||||||
"battery"
|
|
||||||
"custom/left-arrow-dark"
|
|
||||||
"group/hardware"
|
|
||||||
"custom/left-arrow-light"
|
|
||||||
"clock#2"
|
|
||||||
"custom/left-arrow-dark"
|
|
||||||
"clock#1"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
11
modules/nixos/common/appimage.nix
Normal file
11
modules/nixos/common/appimage.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.appimage = lib.mkEnableOption "appimage config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.appimage {
|
||||||
|
programs.appimage = {
|
||||||
|
enable = true;
|
||||||
|
binfmt = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
8
modules/nixos/common/blueman.nix
Normal file
8
modules/nixos/common/blueman.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.blueman = lib.mkEnableOption "blueman config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.blueman {
|
||||||
|
services.blueman.enable = true;
|
||||||
|
services.hardware.bolt.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
12
modules/nixos/common/default.nix
Normal file
12
modules/nixos/common/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ self, lib, ... }:
|
||||||
|
let
|
||||||
|
importNames = lib.swarselsystems.readNix "modules/nixos/common";
|
||||||
|
modulesPath = "${self}/modules";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = lib.swarselsystems.mkImports importNames "modules/nixos/common" ++ [
|
||||||
|
"${modulesPath}/home/common/sharedsetup.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
16
modules/nixos/common/distrobox.nix
Normal file
16
modules/nixos/common/distrobox.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.distrobox = lib.mkEnableOption "distrobox config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.distrobox {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
distrobox
|
||||||
|
boxbuddy
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
package = pkgs.stable.podman;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/nixos/common/env.nix
Normal file
18
modules/nixos/common/env.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.env = lib.mkEnableOption "environment config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.env {
|
||||||
|
environment = {
|
||||||
|
wordlist.enable = true;
|
||||||
|
sessionVariables = {
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with pkgs.gst_all_1; [
|
||||||
|
gst-plugins-good
|
||||||
|
gst-plugins-bad
|
||||||
|
gst-plugins-ugly
|
||||||
|
gst-libav
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
12
modules/nixos/common/gc.nix
Normal file
12
modules/nixos/common/gc.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.gc = lib.mkEnableOption "garbage collection config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.gc {
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
randomizedDelaySec = "14m";
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 10d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/nixos/common/gnome-keyring.nix
Normal file
11
modules/nixos/common/gnome-keyring.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.gnome-keyring = lib.mkEnableOption "gnome-keyring config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.gnome-keyring {
|
||||||
|
services.gnome.gnome-keyring = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.seahorse.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/nixos/common/gvfs.nix
Normal file
7
modules/nixos/common/gvfs.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.gvfs = lib.mkEnableOption "gvfs config for nautilus";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.gvfs {
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
48
modules/nixos/common/hardware.nix
Normal file
48
modules/nixos/common/hardware.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
options.swarselsystems = {
|
||||||
|
modules.hardware = lib.mkEnableOption "hardware config";
|
||||||
|
hasBluetooth = lib.mkEnableOption "bluetooth availability";
|
||||||
|
hasFingerprint = lib.mkEnableOption "fingerprint sensor availability";
|
||||||
|
trackpoint = {
|
||||||
|
isAvailable = lib.mkEnableOption "trackpoint availability";
|
||||||
|
trackpoint.device = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.hardware {
|
||||||
|
hardware = {
|
||||||
|
# opengl.driSupport32Bit = true is replaced with graphics.enable32Bit and hence redundant
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
trackpoint = lib.mkIf config.swarselsystems.trackpoint.isAvailable {
|
||||||
|
enable = true;
|
||||||
|
inherit (config.swarselsystems.trackpoint) device;
|
||||||
|
};
|
||||||
|
|
||||||
|
keyboard.qmk.enable = true;
|
||||||
|
|
||||||
|
enableAllFirmware = true;
|
||||||
|
|
||||||
|
bluetooth = lib.mkIf config.swarselsystems.hasBluetooth {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.stable.bluez;
|
||||||
|
powerOnBoot = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
Enable = "Source,Sink,Media,Socket";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.fprintd.enable = lib.mkIf config.swarselsystems.hasFingerprint true;
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/nixos/common/hardwarecompatibility-keyboards.nix
Normal file
11
modules/nixos/common/hardwarecompatibility-keyboards.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.keyboards = lib.mkEnableOption "keyboards config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.keyboards {
|
||||||
|
services.udev.packages = with pkgs; [
|
||||||
|
qmk-udev-rules
|
||||||
|
vial
|
||||||
|
via
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
12
modules/nixos/common/hardwarecompatibility-ledger.nix
Normal file
12
modules/nixos/common/hardwarecompatibility-ledger.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.ledger = lib.mkEnableOption "ledger config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.ledger {
|
||||||
|
hardware.ledger.enable = true;
|
||||||
|
|
||||||
|
services.udev.packages = with pkgs; [
|
||||||
|
ledger-udev-rules
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
16
modules/nixos/common/hardwarecompatibility-yubikey.nix
Normal file
16
modules/nixos/common/hardwarecompatibility-yubikey.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.yubikey = lib.mkEnableOption "yubikey config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.yubikey {
|
||||||
|
programs.ssh.startAgent = false;
|
||||||
|
|
||||||
|
services.pcscd.enable = false;
|
||||||
|
|
||||||
|
hardware.gpgSmartcards.enable = true;
|
||||||
|
|
||||||
|
services.udev.packages = with pkgs; [
|
||||||
|
yubikey-personalization
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
9
modules/nixos/common/home-manager-extra.nix
Normal file
9
modules/nixos/common/home-manager-extra.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ inputs, config, lib, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.home-managerExtra = lib.mkEnableOption "home-manager extras for non-chaostheatre";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.home-managerExtra {
|
||||||
|
home-manager = lib.mkIf config.swarselsystems.withHomeManager {
|
||||||
|
extraSpecialArgs = { inherit (inputs) nix-secrets nixgl; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
12
modules/nixos/common/home-manager.nix
Normal file
12
modules/nixos/common/home-manager.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ inputs, config, lib, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
options.swarselsystems.modules.home-manager = lib.mkEnableOption "home-manager";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.home-manager {
|
||||||
|
home-manager = lib.mkIf config.swarselsystems.withHomeManager {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = { inherit (inputs) self; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
94
modules/nixos/common/impermanence.nix
Normal file
94
modules/nixos/common/impermanence.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
mapperTarget = lib.swarselsystems.mkIfElse config.swarselsystems.isCrypted "/dev/mapper/cryptroot" "/dev/disk/by-label/nixos";
|
||||||
|
inherit (config.swarselsystems) homeDir isImpermanence isCrypted;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.impermanence = lib.mkEnableOption "impermanence config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.impermanence {
|
||||||
|
|
||||||
|
security.sudo.extraConfig = lib.mkIf isImpermanence ''
|
||||||
|
# rollback results in sudo lectures after each reboot
|
||||||
|
Defaults lecture = never
|
||||||
|
'';
|
||||||
|
|
||||||
|
# This script does the actual wipe of the system
|
||||||
|
# So if it doesn't run, the btrfs system effectively acts like a normal system
|
||||||
|
# Taken from https://github.com/NotAShelf/nyx/blob/2a8273ed3f11a4b4ca027a68405d9eb35eba567b/modules/core/common/system/impermanence/default.nix
|
||||||
|
|
||||||
|
boot.initrd.systemd.enable = lib.mkIf isImpermanence true;
|
||||||
|
|
||||||
|
boot.initrd.systemd.services.rollback = lib.mkIf isImpermanence {
|
||||||
|
description = "Rollback BTRFS root subvolume to a pristine state";
|
||||||
|
wantedBy = [ "initrd.target" ];
|
||||||
|
# make sure it's done after encryption
|
||||||
|
# i.e. LUKS/TPM process
|
||||||
|
after = lib.swarselsystems.mkIfElseList isCrypted [ "systemd-cryptsetup@cryptroot.service" ] [ "dev-disk-by\\x2dlabel-nixos.device" ];
|
||||||
|
requires = lib.mkIf (!isCrypted) [ "dev-disk-by\\x2dlabel-nixos.device" ];
|
||||||
|
# mount the root fs before clearing
|
||||||
|
before = [ "sysroot.mount" ];
|
||||||
|
unitConfig.DefaultDependencies = "no";
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
script = ''
|
||||||
|
mkdir -p /mnt
|
||||||
|
|
||||||
|
# We first mount the btrfs root to /mnt
|
||||||
|
# so we can manipulate btrfs subvolumes.
|
||||||
|
mount -o subvolid=5 -t btrfs ${mapperTarget} /mnt
|
||||||
|
btrfs subvolume list -o /mnt/root
|
||||||
|
|
||||||
|
# While we're tempted to just delete /root and create
|
||||||
|
# a new snapshot from /root-blank, /root is already
|
||||||
|
# populated at this point with a number of subvolumes,
|
||||||
|
# which makes `btrfs subvolume delete` fail.
|
||||||
|
# So, we remove them first.
|
||||||
|
#
|
||||||
|
# /root contains subvolumes:
|
||||||
|
# - /root/var/lib/portables
|
||||||
|
# - /root/var/lib/machines
|
||||||
|
|
||||||
|
btrfs subvolume list -o /mnt/root |
|
||||||
|
cut -f9 -d' ' |
|
||||||
|
while read subvolume; do
|
||||||
|
echo "deleting /$subvolume subvolume..."
|
||||||
|
btrfs subvolume delete "/mnt/$subvolume"
|
||||||
|
done &&
|
||||||
|
echo "deleting /root subvolume..." &&
|
||||||
|
btrfs subvolume delete /mnt/root
|
||||||
|
|
||||||
|
echo "restoring blank /root subvolume..."
|
||||||
|
btrfs subvolume snapshot /mnt/root-blank /mnt/root
|
||||||
|
|
||||||
|
# Once we're done rolling back to a blank snapshot,
|
||||||
|
# we can unmount /mnt and continue on the boot process.
|
||||||
|
umount /mnt
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
environment.persistence."/persist" = lib.mkIf isImpermanence {
|
||||||
|
hideMounts = true;
|
||||||
|
directories =
|
||||||
|
[
|
||||||
|
"/.cache/nix"
|
||||||
|
"/srv"
|
||||||
|
"/etc/nixos"
|
||||||
|
"/etc/nix"
|
||||||
|
"/etc/NetworkManager/system-connections"
|
||||||
|
# "/etc/secureboot"
|
||||||
|
"${homeDir}/.dotfiles"
|
||||||
|
"/var/db/sudo"
|
||||||
|
"/var/cache"
|
||||||
|
"/var/lib"
|
||||||
|
];
|
||||||
|
|
||||||
|
files = [
|
||||||
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
|
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||||
|
"/etc/ssh/ssh_host_rsa_key"
|
||||||
|
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
32
modules/nixos/common/interceptiontools.nix
Normal file
32
modules/nixos/common/interceptiontools.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.interceptionTools = lib.mkEnableOption "interception tools config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.interceptionTools {
|
||||||
|
# Make CAPS work as a dual function ESC/CTRL key
|
||||||
|
services.interception-tools = {
|
||||||
|
enable = true;
|
||||||
|
udevmonConfig =
|
||||||
|
let
|
||||||
|
dualFunctionKeysConfig = builtins.toFile "dual-function-keys.yaml" ''
|
||||||
|
TIMING:
|
||||||
|
TAP_MILLISEC: 200
|
||||||
|
DOUBLE_TAP_MILLISEC: 0
|
||||||
|
|
||||||
|
MAPPINGS:
|
||||||
|
- KEY: KEY_CAPSLOCK
|
||||||
|
TAP: KEY_ESC
|
||||||
|
HOLD: KEY_LEFTCTRL
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
''
|
||||||
|
- JOB: |
|
||||||
|
${pkgs.interception-tools}/bin/intercept -g $DEVNODE \
|
||||||
|
| ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c ${dualFunctionKeysConfig} \
|
||||||
|
| ${pkgs.interception-tools}/bin/uinput -d $DEVNODE
|
||||||
|
DEVICE:
|
||||||
|
EVENTS:
|
||||||
|
EV_KEY: [KEY_CAPSLOCK]
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
modules/nixos/common/lanzaboote.nix
Normal file
17
modules/nixos/common/lanzaboote.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.lanzaboote = lib.mkEnableOption "lanzaboote config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.lanzaboote {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = lib.swarselsystems.mkIfElse (config.swarselsystems.initialSetup || !config.swarselsystems.isSecureBoot) (lib.mkForce true) (lib.mkForce false);
|
||||||
|
};
|
||||||
|
lanzaboote = lib.mkIf (!config.swarselsystems.initialSetup && config.swarselsystems.isSecureBoot) {
|
||||||
|
enable = true;
|
||||||
|
pkiBundle = "/var/lib/sbctl";
|
||||||
|
configurationLimit = 3;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
37
modules/nixos/common/lid.nix
Normal file
37
modules/nixos/common/lid.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.lid = lib.mkEnableOption "lid config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.lid {
|
||||||
|
services.logind = {
|
||||||
|
lidSwitch = "suspend";
|
||||||
|
lidSwitchDocked = "ignore";
|
||||||
|
};
|
||||||
|
services.acpid = {
|
||||||
|
enable = true;
|
||||||
|
handlers.lidClosed = {
|
||||||
|
event = "button/lid \\w+ close";
|
||||||
|
action = ''
|
||||||
|
cat /sys/class/backlight/amdgpu_bl1/device/enabled
|
||||||
|
if grep -Fxq disabled /sys/class/backlight/amdgpu_bl1/device/enabled
|
||||||
|
then
|
||||||
|
echo "Lid closed. Disabling fprintd."
|
||||||
|
systemctl stop fprintd
|
||||||
|
ln -s /dev/null /run/systemd/transient/fprintd.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
handlers.lidOpen = {
|
||||||
|
event = "button/lid \\w+ open";
|
||||||
|
action = ''
|
||||||
|
if ! $(systemctl is-active --quiet fprintd); then
|
||||||
|
echo "Lid open. Enabling fprintd."
|
||||||
|
rm -f /run/systemd/transient/fprintd.service
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl start fprintd
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
23
modules/nixos/common/login.nix
Normal file
23
modules/nixos/common/login.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.login = lib.mkEnableOption "login config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.login {
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
initial_session.command = "sway";
|
||||||
|
default_session.command = ''
|
||||||
|
${pkgs.greetd.tuigreet}/bin/tuigreet \
|
||||||
|
--time \
|
||||||
|
--asterisks \
|
||||||
|
--user-menu \
|
||||||
|
--cmd sway
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc."greetd/environments".text = ''
|
||||||
|
sway
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
29
modules/nixos/common/lowbattery.nix
Normal file
29
modules/nixos/common/lowbattery.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.lowBattery = lib.mkEnableOption "low battery notification config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.lowBattery {
|
||||||
|
systemd.user.services."battery-low" = {
|
||||||
|
enable = true;
|
||||||
|
description = "Timer for battery check that alerts at 10% or less";
|
||||||
|
partOf = [ "graphical-session.target" ];
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = pkgs.writeShellScript "battery-low-notification"
|
||||||
|
''
|
||||||
|
if (( 10 >= $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") && $(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%" | ${lib.getExe pkgs.ripgrep} -o "\d+") > 0 ));
|
||||||
|
then ${lib.getExe pkgs.libnotify} --urgency=critical "low battery" "$(${lib.getExe pkgs.acpi} -b | head -n 1 | ${lib.getExe pkgs.ripgrep} -o "\d+%")";
|
||||||
|
fi;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.timers."battery-low" = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
timerConfig = {
|
||||||
|
# Every Minute
|
||||||
|
OnCalendar = "*-*-* *:*:00";
|
||||||
|
Unit = "battery-low.service";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
251
modules/nixos/common/network.nix
Normal file
251
modules/nixos/common/network.nix
Normal file
|
|
@ -0,0 +1,251 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems = {
|
||||||
|
modules.network = lib.mkEnableOption "network config";
|
||||||
|
firewall = lib.swarselsystems.mkTrueOption;
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.network {
|
||||||
|
networking = {
|
||||||
|
nftables.enable = lib.mkDefault true;
|
||||||
|
enableIPv6 = lib.mkDefault true;
|
||||||
|
firewall = {
|
||||||
|
enable = lib.swarselsystems.mkStrong config.swarselsystems.firewall;
|
||||||
|
checkReversePath = lib.mkDefault false;
|
||||||
|
allowedUDPPorts = [ 51820 ]; # 51820: wireguard
|
||||||
|
allowedTCPPortRanges = [
|
||||||
|
{ from = 1714; to = 1764; } # kde-connect
|
||||||
|
];
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
{ from = 1714; to = 1764; } # kde-connect
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
ensureProfiles = lib.mkIf (!config.swarselsystems.isPublic) {
|
||||||
|
environmentFiles = [
|
||||||
|
"${config.sops.templates."network-manager.env".path}"
|
||||||
|
];
|
||||||
|
profiles = {
|
||||||
|
"Ernest Routerford" = {
|
||||||
|
connection = {
|
||||||
|
id = "Ernest Routerford";
|
||||||
|
permissions = "";
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
ipv4 = {
|
||||||
|
dns-search = "";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "stable-privacy";
|
||||||
|
dns-search = "";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
wifi = {
|
||||||
|
mac-address-blacklist = "";
|
||||||
|
mode = "infrastructure";
|
||||||
|
ssid = "Ernest Routerford";
|
||||||
|
};
|
||||||
|
wifi-security = {
|
||||||
|
auth-alg = "open";
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = "$ERNEST";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
LAN-Party = {
|
||||||
|
connection = {
|
||||||
|
autoconnect = "false";
|
||||||
|
id = "LAN-Party";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
ethernet = {
|
||||||
|
auto-negotiate = "true";
|
||||||
|
cloned-mac-address = "preserve";
|
||||||
|
mac-address = "90:2E:16:D0:A1:87";
|
||||||
|
};
|
||||||
|
ipv4 = { method = "shared"; };
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "stable-privacy";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
eduroam = {
|
||||||
|
"802-1x" = {
|
||||||
|
eap = "ttls;";
|
||||||
|
identity = "$EDUID";
|
||||||
|
password = "$EDUPASS";
|
||||||
|
phase2-auth = "mschapv2";
|
||||||
|
};
|
||||||
|
connection = {
|
||||||
|
id = "eduroam";
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
ipv4 = { method = "auto"; };
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "default";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
wifi = {
|
||||||
|
mode = "infrastructure";
|
||||||
|
ssid = "eduroam";
|
||||||
|
};
|
||||||
|
wifi-security = {
|
||||||
|
auth-alg = "open";
|
||||||
|
key-mgmt = "wpa-eap";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
local = {
|
||||||
|
connection = {
|
||||||
|
autoconnect = "false";
|
||||||
|
id = "local";
|
||||||
|
type = "ethernet";
|
||||||
|
};
|
||||||
|
ethernet = { };
|
||||||
|
ipv4 = {
|
||||||
|
address1 = "10.42.1.1/24";
|
||||||
|
method = "shared";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "stable-privacy";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
HH40V_39F5 = {
|
||||||
|
connection = {
|
||||||
|
id = "HH40V_39F5";
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
ipv4 = { method = "auto"; };
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "stable-privacy";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
wifi = {
|
||||||
|
band = "bg";
|
||||||
|
mode = "infrastructure";
|
||||||
|
ssid = "HH40V_39F5";
|
||||||
|
};
|
||||||
|
wifi-security = {
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = "$FRAUNS";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
magicant = {
|
||||||
|
connection = {
|
||||||
|
id = "magicant";
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
ipv4 = { method = "auto"; };
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "default";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
wifi = {
|
||||||
|
mode = "infrastructure";
|
||||||
|
ssid = "magicant";
|
||||||
|
};
|
||||||
|
wifi-security = {
|
||||||
|
auth-alg = "open";
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
psk = "$HANDYHOTSPOT";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wireguardvpn = {
|
||||||
|
connection = {
|
||||||
|
id = "HomeVPN";
|
||||||
|
type = "wireguard";
|
||||||
|
autoconnect = "false";
|
||||||
|
interface-name = "wg1";
|
||||||
|
};
|
||||||
|
wireguard = { private-key = "$WIREGUARDPRIV"; };
|
||||||
|
"wireguard-peer.$WIREGUARDPUB" = {
|
||||||
|
endpoint = "$WIREGUARDENDPOINT";
|
||||||
|
allowed-ips = "0.0.0.0/0";
|
||||||
|
};
|
||||||
|
ipv4 = {
|
||||||
|
method = "ignore";
|
||||||
|
address1 = "192.168.3.3/32";
|
||||||
|
};
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "stable-privacy";
|
||||||
|
method = "ignore";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
"sweden-aes-128-cbc-udp-dns" = {
|
||||||
|
connection = {
|
||||||
|
autoconnect = "false";
|
||||||
|
id = "PIA Sweden";
|
||||||
|
type = "vpn";
|
||||||
|
};
|
||||||
|
ipv4 = { method = "auto"; };
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "stable-privacy";
|
||||||
|
method = "auto";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
vpn = {
|
||||||
|
auth = "sha1";
|
||||||
|
ca = config.sops.secrets."sweden-aes-128-cbc-udp-dns-ca.pem".path;
|
||||||
|
challenge-response-flags = "2";
|
||||||
|
cipher = "aes-128-cbc";
|
||||||
|
compress = "yes";
|
||||||
|
connection-type = "password";
|
||||||
|
crl-verify-file = config.sops.secrets."sweden-aes-128-cbc-udp-dns-crl-verify.pem".path;
|
||||||
|
dev = "tun";
|
||||||
|
password-flags = "0";
|
||||||
|
remote = "sweden.privacy.network:1198";
|
||||||
|
remote-cert-tls = "server";
|
||||||
|
reneg-seconds = "0";
|
||||||
|
service-type = "org.freedesktop.NetworkManager.openvpn";
|
||||||
|
username = "$VPNUSER";
|
||||||
|
};
|
||||||
|
vpn-secrets = { password = "$VPNPASS"; };
|
||||||
|
};
|
||||||
|
|
||||||
|
Hotspot = {
|
||||||
|
connection = {
|
||||||
|
autoconnect = "false";
|
||||||
|
id = "Hotspot";
|
||||||
|
type = "wifi";
|
||||||
|
};
|
||||||
|
ipv4 = { method = "shared"; };
|
||||||
|
ipv6 = {
|
||||||
|
addr-gen-mode = "default";
|
||||||
|
method = "ignore";
|
||||||
|
};
|
||||||
|
proxy = { };
|
||||||
|
wifi = {
|
||||||
|
mode = "ap";
|
||||||
|
ssid = "Hotspot-${config.swarselsystems.mainUser}";
|
||||||
|
};
|
||||||
|
wifi-security = {
|
||||||
|
group = "ccmp;";
|
||||||
|
key-mgmt = "wpa-psk";
|
||||||
|
pairwise = "ccmp;";
|
||||||
|
proto = "rsn;";
|
||||||
|
psk = "$HOTSPOT";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.NetworkManager-ensure-profiles.after = [ "NetworkManager.service" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
33
modules/nixos/common/networkdevices.nix
Normal file
33
modules/nixos/common/networkdevices.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.networkDevices = lib.mkEnableOption "network device config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.networkDevices {
|
||||||
|
# enable scanners over network
|
||||||
|
hardware.sane = {
|
||||||
|
enable = true;
|
||||||
|
extraBackends = [ pkgs.sane-airscan ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# enable discovery and usage of network devices (esp. printers)
|
||||||
|
services.printing = {
|
||||||
|
enable = true;
|
||||||
|
drivers = [
|
||||||
|
pkgs.gutenprint
|
||||||
|
pkgs.gutenprintBin
|
||||||
|
];
|
||||||
|
browsedConf = ''
|
||||||
|
BrowseDNSSDSubTypes _cups,_print
|
||||||
|
BrowseLocalProtocols all
|
||||||
|
BrowseRemoteProtocols all
|
||||||
|
CreateIPPPrinterQueues All
|
||||||
|
BrowseProtocols all
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
113
modules/nixos/common/nix-ld.nix
Normal file
113
modules/nixos/common/nix-ld.nix
Normal file
|
|
@ -0,0 +1,113 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.nix-ld = lib.mkEnableOption "nix-ld config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.nix-ld {
|
||||||
|
programs.nix-ld = {
|
||||||
|
enable = true;
|
||||||
|
libraries = with pkgs; [
|
||||||
|
SDL
|
||||||
|
SDL2
|
||||||
|
SDL2_image
|
||||||
|
SDL2_mixer
|
||||||
|
SDL2_ttf
|
||||||
|
SDL_image
|
||||||
|
SDL_mixer
|
||||||
|
SDL_ttf
|
||||||
|
alsa-lib
|
||||||
|
at-spi2-atk
|
||||||
|
at-spi2-core
|
||||||
|
atk
|
||||||
|
bzip2
|
||||||
|
cairo
|
||||||
|
cups
|
||||||
|
curl
|
||||||
|
dbus
|
||||||
|
dbus-glib
|
||||||
|
expat
|
||||||
|
ffmpeg
|
||||||
|
flac
|
||||||
|
fontconfig
|
||||||
|
freeglut
|
||||||
|
freetype
|
||||||
|
fuse3
|
||||||
|
gdk-pixbuf
|
||||||
|
glew110
|
||||||
|
glib
|
||||||
|
stable.gnome2.GConf
|
||||||
|
pango
|
||||||
|
gtk2
|
||||||
|
gtk3
|
||||||
|
icu
|
||||||
|
libGL
|
||||||
|
libappindicator-gtk2
|
||||||
|
libappindicator-gtk3
|
||||||
|
libcaca
|
||||||
|
libcanberra
|
||||||
|
libcap
|
||||||
|
libdbusmenu-gtk2
|
||||||
|
libdrm
|
||||||
|
libelf
|
||||||
|
libgcrypt
|
||||||
|
libglvnd
|
||||||
|
libidn
|
||||||
|
libindicator-gtk2
|
||||||
|
libjpeg
|
||||||
|
libmikmod
|
||||||
|
libnotify
|
||||||
|
libogg
|
||||||
|
libpng
|
||||||
|
libpng12
|
||||||
|
libpulseaudio
|
||||||
|
librsvg
|
||||||
|
libsamplerate
|
||||||
|
libtheora
|
||||||
|
libtiff
|
||||||
|
libudev0-shim
|
||||||
|
libunwind
|
||||||
|
libusb1
|
||||||
|
libuuid
|
||||||
|
libva
|
||||||
|
libvdpau
|
||||||
|
libvorbis
|
||||||
|
libvpx
|
||||||
|
libxkbcommon
|
||||||
|
libxml2
|
||||||
|
libz
|
||||||
|
mesa
|
||||||
|
nspr
|
||||||
|
nss
|
||||||
|
openssl
|
||||||
|
pango
|
||||||
|
pipewire
|
||||||
|
pixman
|
||||||
|
speex
|
||||||
|
stdenv.cc.cc
|
||||||
|
steam-fhsenv-without-steam
|
||||||
|
systemd
|
||||||
|
tbb
|
||||||
|
vulkan-loader
|
||||||
|
xorg.libICE
|
||||||
|
xorg.libSM
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
xorg.libXcomposite
|
||||||
|
xorg.libXcursor
|
||||||
|
xorg.libXdamage
|
||||||
|
xorg.libXext
|
||||||
|
xorg.libXfixes
|
||||||
|
xorg.libXft
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXinerama
|
||||||
|
xorg.libXmu
|
||||||
|
xorg.libXrandr
|
||||||
|
xorg.libXrender
|
||||||
|
xorg.libXt
|
||||||
|
xorg.libXtst
|
||||||
|
xorg.libXxf86vm
|
||||||
|
xorg.libxcb
|
||||||
|
xorg.libxshmfence
|
||||||
|
zlib
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/nixos/common/nvd-rebuild.nix
Normal file
13
modules/nixos/common/nvd-rebuild.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.nvd = lib.mkEnableOption "nvd config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.nvd {
|
||||||
|
system.activationScripts.diff = {
|
||||||
|
supportsDryActivation = true;
|
||||||
|
text = ''
|
||||||
|
${pkgs.nvd}/bin/nvd --color=always --nix-bin-dir=${pkgs.nix}/bin diff \
|
||||||
|
/run/current-system "$systemConfig"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
83
modules/nixos/common/packages.nix
Normal file
83
modules/nixos/common/packages.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.packages = lib.mkEnableOption "install packages";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.packages {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# yubikey packages
|
||||||
|
gnupg
|
||||||
|
yubikey-personalization
|
||||||
|
yubikey-personalization-gui
|
||||||
|
yubico-pam
|
||||||
|
yubioath-flutter
|
||||||
|
yubikey-manager
|
||||||
|
yubikey-touch-detector
|
||||||
|
yubico-piv-tool
|
||||||
|
cfssl
|
||||||
|
pcsctools
|
||||||
|
pcscliteWithPolkit.out
|
||||||
|
|
||||||
|
# ledger packages
|
||||||
|
ledger-live-desktop
|
||||||
|
|
||||||
|
# pinentry
|
||||||
|
dbus
|
||||||
|
swaylock-effects
|
||||||
|
syncthingtray-minimal
|
||||||
|
wl-mirror
|
||||||
|
swayosd
|
||||||
|
|
||||||
|
# secure boot
|
||||||
|
sbctl
|
||||||
|
|
||||||
|
libsForQt5.qt5.qtwayland
|
||||||
|
|
||||||
|
# nix package database
|
||||||
|
nix-index
|
||||||
|
nixos-generators
|
||||||
|
|
||||||
|
# commit hooks
|
||||||
|
pre-commit
|
||||||
|
|
||||||
|
# proc info
|
||||||
|
acpi
|
||||||
|
|
||||||
|
# pci info
|
||||||
|
pciutils
|
||||||
|
usbutils
|
||||||
|
|
||||||
|
# better make for general tasks
|
||||||
|
just
|
||||||
|
|
||||||
|
screenshare
|
||||||
|
fullscreen
|
||||||
|
|
||||||
|
# keyboards
|
||||||
|
qmk
|
||||||
|
vial
|
||||||
|
via
|
||||||
|
|
||||||
|
# theme related
|
||||||
|
adwaita-icon-theme
|
||||||
|
|
||||||
|
# kde-connect
|
||||||
|
xdg-desktop-portal
|
||||||
|
xdg-desktop-portal-wlr
|
||||||
|
|
||||||
|
# bluetooth
|
||||||
|
bluez
|
||||||
|
ghostscript_headless
|
||||||
|
wireguard-tools
|
||||||
|
nixd
|
||||||
|
zig
|
||||||
|
zls
|
||||||
|
ansible-language-server
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
|
"jitsi-meet-1.0.8043"
|
||||||
|
"electron-29.4.6"
|
||||||
|
"SDL_ttf-2.0.11"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
19
modules/nixos/common/pipewire.nix
Normal file
19
modules/nixos/common/pipewire.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.pipewire = lib.mkEnableOption "pipewire config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.pipewire {
|
||||||
|
security.rtkit.enable = true; # this is required for pipewire real-time access
|
||||||
|
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
audio.enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
alsa = {
|
||||||
|
enable = true;
|
||||||
|
support32Bit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
22
modules/nixos/common/polkit.nix
Normal file
22
modules/nixos/common/polkit.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.security = lib.mkEnableOption "security config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.security {
|
||||||
|
|
||||||
|
security = {
|
||||||
|
pam.services = {
|
||||||
|
login.u2fAuth = true;
|
||||||
|
sudo.u2fAuth = true;
|
||||||
|
swaylock.u2fAuth = true;
|
||||||
|
swaylock.fprintAuth = false;
|
||||||
|
};
|
||||||
|
polkit.enable = true;
|
||||||
|
|
||||||
|
sudo.extraConfig = ''
|
||||||
|
Defaults env_keep+=SSH_AUTH_SOCK
|
||||||
|
Defaults env_keep+=XDG_RUNTIME_DIR
|
||||||
|
Defaults env_keep+=WAYLAND_DISPLAY
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/nixos/common/power-profiles-daemon.nix
Normal file
7
modules/nixos/common/power-profiles-daemon.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ lib, config, ... }:
|
||||||
|
{
|
||||||
|
options.swarselsystems.modules.ppd = lib.mkEnableOption "power profiles daemon config";
|
||||||
|
config = lib.mkIf config.swarselsystems.modules.ppd {
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue