Compare commits
16 Commits
ef21567b64
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ab5be9644 | |||
| 8772229192 | |||
| 625039ee58 | |||
| 7b9122fe7f | |||
| 94f392c388 | |||
| efe873d714 | |||
| a8d8c4dde9 | |||
| f5d5791efd | |||
| 6c53fe1aae | |||
| 2e3b0b6a35 | |||
| 38dc75a6e1 | |||
| 82e26ee498 | |||
| 0a731ef17f | |||
| 58b0456f8c | |||
| b24d0f466a | |||
| d91ebe083d |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
# Result is a symlink to the built iso
|
||||
result
|
||||
result
|
||||
# direnv binaries
|
||||
.direnv
|
||||
|
||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
[submodule "secrets"]
|
||||
path = secrets
|
||||
url = ssh://git@git.kluster.moll.re:2222/remoll/nixos-secrets.git
|
||||
12
.sops.yaml
Normal file
12
.sops.yaml
Normal file
@@ -0,0 +1,12 @@
|
||||
keys:
|
||||
- &remy_usb age1027e2vu808mvf95m4f0am3aeg88n8vgzt56s04ndpkgm7awzeajspxl6tu
|
||||
- &remy_yoga ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX4zsiXSSWbE75C0wyBVwaHOw6Gsbh/WqQsgEhvPwT8 remy@nyx
|
||||
|
||||
- &host_yoga age1ckqer7nxzq7q58v9xaqy8ac9vx2va69a46t86wp9m78pj5dpuy3sq8xeaj
|
||||
creation_rules:
|
||||
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
|
||||
key_groups:
|
||||
- age:
|
||||
- *remy_usb
|
||||
- *remy_yoga
|
||||
- *host_yoga
|
||||
30
README.md
30
README.md
@@ -17,6 +17,7 @@ Don't forget to add the `#<host>` to the end of the target to specify the host c
|
||||
|
||||
### Spectre
|
||||
|
||||
###
|
||||
|
||||
|
||||
|
||||
@@ -26,10 +27,17 @@ Run
|
||||
```bash
|
||||
nixos-rebuild switch --flake <target>#<machine>
|
||||
# for instance
|
||||
nixos-rebuild switch --flake .#spectre
|
||||
nixos-rebuild switch --flake .#Nixtre
|
||||
```
|
||||
to apply the configuration.
|
||||
|
||||
### Using `nh`
|
||||
Updating from a local config is now easy - since `nh` is already specified as installed:
|
||||
```
|
||||
nix flake update
|
||||
nh os switch .
|
||||
```
|
||||
|
||||
|
||||
### Installer iso
|
||||
To build an installer iso, run
|
||||
@@ -45,6 +53,10 @@ TODO - disable root user
|
||||
I install with --no-root-passwd and set users.mutableUsers = false in configuration.nix
|
||||
```
|
||||
|
||||
## TODO
|
||||
|
||||
|
||||
|
||||
|
||||
## Inspirations
|
||||
- https://github.com/the-nix-way/dev-templates
|
||||
@@ -55,6 +67,20 @@ TODO - disable root user
|
||||
- https://github.com/anotherhadi/nixy
|
||||
- https://github.com/Numb-0/nix-0
|
||||
- https://github.com/Frost-Phoenix/nixos-config
|
||||
- https://github.com/elifouts/Dotfiles
|
||||
- https://github.com/nomadics9/nixcfg
|
||||
- https://github.com/Daholli/nixos-config
|
||||
- https://github.com/khaneliman/khanelinix
|
||||
- https://github.com/NotAShelf/nyx
|
||||
- https://copeberg.org/bloxx12/nichts
|
||||
- https://github.com/fufexan/dotfiles
|
||||
- https://github.com/spikespaz/dotfiles
|
||||
- https://github.com/luisnquin/nixos-config
|
||||
- https://gitlab.com/fisuri/dotfiles
|
||||
- https://github.com/NobbZ/nixos-config
|
||||
- https://code.maralorn.de/maralorn/config/
|
||||
- https://github.com/sameemul-haque/dotfiles
|
||||
|
||||
|
||||
#### Hyprland specific
|
||||
- https://github.com/elifouts/Dotfiles
|
||||
- https://github.com/Abhra00/hyprdots
|
||||
|
||||
629
flake.lock
generated
629
flake.lock
generated
@@ -20,11 +20,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736102453,
|
||||
"narHash": "sha256-5qb4kb7Xbt8jJFL/oDqOor9Z2+E+A+ql3PiyDvsfWZ0=",
|
||||
"lastModified": 1762356719,
|
||||
"narHash": "sha256-qwd/xdoOya1m8FENle+4hWnydCtlXUWLAW/Auk6WL7s=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"rev": "4846091641f3be0ad7542086d52769bb7932bde6",
|
||||
"rev": "6d0b3567584691bf9d8fedb5d0093309e2f979c7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -38,11 +38,11 @@
|
||||
"fromYaml": "fromYaml"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732200724,
|
||||
"narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=",
|
||||
"lastModified": 1755819240,
|
||||
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "153d52373b0fb2d343592871009a286ec8837aec",
|
||||
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -54,27 +54,28 @@
|
||||
"base16-fish": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1622559957,
|
||||
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
|
||||
"lastModified": 1754405784,
|
||||
"narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=",
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
|
||||
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-helix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736852337,
|
||||
"narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=",
|
||||
"lastModified": 1752979451,
|
||||
"narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5",
|
||||
"rev": "27cf1e66e50abc622fb76a3019012dc07c678fac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -100,14 +101,76 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dankMaterialShell": {
|
||||
"inputs": {
|
||||
"dgop": "dgop",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763522195,
|
||||
"narHash": "sha256-QW/SKfUN5nT8J1EIvtpNaGf886+BBp2vCvs/ZuMo0VE=",
|
||||
"owner": "AvengeMedia",
|
||||
"repo": "DankMaterialShell",
|
||||
"rev": "dfdaa82245302d40ac1aa4c0d60728b4397dde61",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "AvengeMedia",
|
||||
"repo": "DankMaterialShell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dgop": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"dankMaterialShell",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762435535,
|
||||
"narHash": "sha256-QhzRn7pYN35IFpKjjxJAj3GPJECuC+VLhoGem3ezycc=",
|
||||
"owner": "AvengeMedia",
|
||||
"repo": "dgop",
|
||||
"rev": "6cf638dde818f9f8a2e26d0243179c43cb3458d7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "AvengeMedia",
|
||||
"repo": "dgop",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dms-cli": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763078370,
|
||||
"narHash": "sha256-wsYqJlLdRSlJpRE0tIuuPMU6aOyhMdV237rEG/enUxY=",
|
||||
"owner": "AvengeMedia",
|
||||
"repo": "danklinux",
|
||||
"rev": "7a083a0d6d087d41d0bc5077d03e662e1417ce3c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "AvengeMedia",
|
||||
"repo": "danklinux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1741628778,
|
||||
"narHash": "sha256-RsvHGNTmO2e/eVfgYK7g+eYEdwwh7SbZa+gZkT24MEA=",
|
||||
"lastModified": 1758112371,
|
||||
"narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "5a81d390bb64afd4e81221749ec4bffcbeb5fa80",
|
||||
"rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -119,11 +182,11 @@
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -132,40 +195,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733328505,
|
||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
"nixpkgs-lib": [
|
||||
"stylix",
|
||||
"systems"
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"lastModified": 1756770412,
|
||||
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@@ -185,32 +232,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"stylix",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore_2",
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741379162,
|
||||
"narHash": "sha256-srpAbmJapkaqGRE3ytf3bj4XshspVR5964OX5LfjDWc=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "b5a62751225b2f62ff3147d0a334055ebadcd5cc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -233,43 +254,23 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gnome-shell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1732369855,
|
||||
"narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=",
|
||||
"host": "gitlab.gnome.org",
|
||||
"lastModified": 1762869044,
|
||||
"narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=",
|
||||
"owner": "GNOME",
|
||||
"repo": "gnome-shell",
|
||||
"rev": "dadd58f630eeea41d645ee225a63f719390829dc",
|
||||
"type": "github"
|
||||
"rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"host": "gitlab.gnome.org",
|
||||
"owner": "GNOME",
|
||||
"ref": "47.2",
|
||||
"ref": "gnome-49",
|
||||
"repo": "gnome-shell",
|
||||
"type": "github"
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
@@ -279,16 +280,15 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736373539,
|
||||
"narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
|
||||
"lastModified": 1763416652,
|
||||
"narHash": "sha256-8EBEEvtzQ11LCxpQHMNEBQAGtQiCu/pqP9zSovDSbNM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
|
||||
"rev": "ea164b7c9ccdc2321379c2ff78fd4317b4c41312",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -296,21 +296,20 @@
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"zen-browser",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739757849,
|
||||
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
|
||||
"lastModified": 1762964643,
|
||||
"narHash": "sha256-RYHN8O/Aja59XDji6WSJZPkJpYVUfpSkyH+PEupBJqM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
|
||||
"rev": "827f2a23373a774a8805f84ca5344654c31f354b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -331,11 +330,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734906540,
|
||||
"narHash": "sha256-vQ/L9hZFezC0LquLo4TWXkyniWtYBlFHAKIsDc7PYJE=",
|
||||
"lastModified": 1753964049,
|
||||
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprcursor",
|
||||
"rev": "69270ba8f057d55b0e6c2dca0e165d652856e613",
|
||||
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -360,11 +359,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736115290,
|
||||
"narHash": "sha256-Jcn6yAzfUMcxy3tN/iZRbi/QgrYm7XLyVRl9g/nbUl4=",
|
||||
"lastModified": 1762462052,
|
||||
"narHash": "sha256-6roLYzcDf4V38RUMSqycsOwAnqfodL6BmhRkUtwIgdA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprgraphics",
|
||||
"rev": "52202272d89da32a9f866c0d10305a5e3d954c50",
|
||||
"rev": "ffc999d980c7b3bca85d3ebd0a9fbadf984a8162",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -378,8 +377,8 @@
|
||||
"aquamarine": "aquamarine",
|
||||
"hyprcursor": "hyprcursor",
|
||||
"hyprgraphics": "hyprgraphics",
|
||||
"hyprland-guiutils": "hyprland-guiutils",
|
||||
"hyprland-protocols": "hyprland-protocols",
|
||||
"hyprland-qtutils": "hyprland-qtutils",
|
||||
"hyprlang": "hyprlang",
|
||||
"hyprutils": "hyprutils",
|
||||
"hyprwayland-scanner": "hyprwayland-scanner",
|
||||
@@ -389,11 +388,11 @@
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737038559,
|
||||
"narHash": "sha256-irqN8zKwpQ0NFxEvV/wQRdopClwkyZXCQoF7mgX/Uss=",
|
||||
"lastModified": 1763540034,
|
||||
"narHash": "sha256-TogNk567BTZib1XiYheW04ELxNB2bhee6G4SgphRqmA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "0dc7367a7006cc3cc877d52bf34c4998144bff84",
|
||||
"rev": "fbb31503f1b69402eeda81ba75a547c862c88bf2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -402,6 +401,52 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-guiutils": {
|
||||
"inputs": {
|
||||
"aquamarine": [
|
||||
"hyprland",
|
||||
"aquamarine"
|
||||
],
|
||||
"hyprgraphics": [
|
||||
"hyprland",
|
||||
"hyprgraphics"
|
||||
],
|
||||
"hyprlang": [
|
||||
"hyprland",
|
||||
"hyprlang"
|
||||
],
|
||||
"hyprtoolkit": "hyprtoolkit",
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"hyprwayland-scanner": [
|
||||
"hyprland",
|
||||
"hyprwayland-scanner"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762755186,
|
||||
"narHash": "sha256-ZjjETUHtoEhVN7JI1Cbt3p/KcXpK8ZQaPHx7UkG1OgA=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-guiutils",
|
||||
"rev": "66356e20a8ed348aa49c1b9ceace786e224225b3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-guiutils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-protocols": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -414,11 +459,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735774328,
|
||||
"narHash": "sha256-vIRwLS9w+N99EU1aJ+XNOU6mJTxrUBa31i1r82l0V7s=",
|
||||
"lastModified": 1759610243,
|
||||
"narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "e3b6af97ddcfaafbda8e2828c719a5af84f662cb",
|
||||
"rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -427,35 +472,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprland-qtutils": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprutils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736114838,
|
||||
"narHash": "sha256-FxbuGQExtN37ToWYnGmO6weOYN6WPHN/RAqbr7gNPek=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-qtutils",
|
||||
"rev": "6997fe382dcf396704227d2b98ffdd5066da6959",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-qtutils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprlang": {
|
||||
"inputs": {
|
||||
"hyprutils": [
|
||||
@@ -472,11 +488,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735393019,
|
||||
"narHash": "sha256-NPpqA8rtmDLsEmZOmz+qR67zsB6Y503Jnv+nSFLKJZ8=",
|
||||
"lastModified": 1763254292,
|
||||
"narHash": "sha256-JNgz3Fz2KMzkT7aR72wsgu/xNeJB//LSmdilh8Z/Zao=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "55608efdaa387af7bfdc0eddb404c409958efa43",
|
||||
"rev": "deea98d5b61d066bdc7a68163edd2c4bd28d3a6b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -485,6 +501,58 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprtoolkit": {
|
||||
"inputs": {
|
||||
"aquamarine": [
|
||||
"hyprland",
|
||||
"hyprland-guiutils",
|
||||
"aquamarine"
|
||||
],
|
||||
"hyprgraphics": [
|
||||
"hyprland",
|
||||
"hyprland-guiutils",
|
||||
"hyprgraphics"
|
||||
],
|
||||
"hyprlang": [
|
||||
"hyprland",
|
||||
"hyprland-guiutils",
|
||||
"hyprlang"
|
||||
],
|
||||
"hyprutils": [
|
||||
"hyprland",
|
||||
"hyprland-guiutils",
|
||||
"hyprutils"
|
||||
],
|
||||
"hyprwayland-scanner": [
|
||||
"hyprland",
|
||||
"hyprland-guiutils",
|
||||
"hyprwayland-scanner"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"hyprland",
|
||||
"hyprland-guiutils",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": [
|
||||
"hyprland",
|
||||
"hyprland-guiutils",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762463729,
|
||||
"narHash": "sha256-2fYkU/mdz8WKY3dkDPlE/j6hTxIwqultsx4gMMsMns0=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprtoolkit",
|
||||
"rev": "88483bdee5329ec985f0c8f834c519cd18cfe532",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprtoolkit",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprutils": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -497,11 +565,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736164519,
|
||||
"narHash": "sha256-1LimBKvDpBbeX+qW7T240WEyw+DBVpDotZB4JYm8Aps=",
|
||||
"lastModified": 1763323331,
|
||||
"narHash": "sha256-+Z0OfCo1MS8/aIutSAW5aJR9zTae1wz9kcJYMgpwN6M=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprutils",
|
||||
"rev": "3c895da64b0eb19870142196fa48c07090b441c4",
|
||||
"rev": "0c6411851cc779d551edc89b83966696201611aa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -522,11 +590,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735493474,
|
||||
"narHash": "sha256-fktzv4NaqKm94VAkAoVqO/nqQlw+X0/tJJNAeCSfzK4=",
|
||||
"lastModified": 1755184602,
|
||||
"narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprwayland-scanner",
|
||||
"rev": "de913476b59ee88685fdc018e77b8f6637a2ae0b",
|
||||
"rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -537,27 +605,47 @@
|
||||
},
|
||||
"nix-flatpak": {
|
||||
"locked": {
|
||||
"lastModified": 1711997201,
|
||||
"narHash": "sha256-J71xzQlVYsjagA4AsVwRazhBh2rZrPpKvxTgs6UzL7c=",
|
||||
"lastModified": 1754777568,
|
||||
"narHash": "sha256-0bBqT+3XncgF8F03RFAamw9vdf0VmaDoIJLTGkjfQZs=",
|
||||
"owner": "gmodena",
|
||||
"repo": "nix-flatpak",
|
||||
"rev": "b76fa31346db7fc958a9898f3c594696ca71c4fd",
|
||||
"rev": "62f636b87ef6050760a8cb325cadb90674d1e23e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gmodena",
|
||||
"ref": "v0.4.1",
|
||||
"repo": "nix-flatpak",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix4vscode": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763517711,
|
||||
"narHash": "sha256-uY0Vr7ene4VlHyeZRHRNvT4WRwakAr8JShwmNEg7JB0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix4vscode",
|
||||
"rev": "ce4507078be02de77c001ca498657436ec815a35",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix4vscode",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1736012469,
|
||||
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
|
||||
"lastModified": 1763283776,
|
||||
"narHash": "sha256-Y7TDFPK4GlqrKrivOcsHG8xSGqQx3A6c+i7novT85Uk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
|
||||
"rev": "50a96edd8d0db6cc8db57dab6bb6d6ee1f3dc49a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -569,11 +657,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1724819573,
|
||||
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
|
||||
"lastModified": 1763421233,
|
||||
"narHash": "sha256-Stk9ZYRkGrnnpyJ4eqt9eQtdFWRRIvMxpNRf4sIegnw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
|
||||
"rev": "89c2b2330e733d6cdb5eae7b899326930c2c0648",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -585,33 +673,42 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1736549401,
|
||||
"narHash": "sha256-ibkQrMHxF/7TqAYcQE+tOnIsSEzXmMegzyBWza6uHKM=",
|
||||
"lastModified": 1763421233,
|
||||
"narHash": "sha256-Stk9ZYRkGrnnpyJ4eqt9eQtdFWRRIvMxpNRf4sIegnw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1dab772dd4a68a7bba5d9460685547ff8e17d899",
|
||||
"rev": "89c2b2330e733d6cdb5eae7b899326930c2c0648",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.11",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
"stylix",
|
||||
"flake-parts"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741600792,
|
||||
"narHash": "sha256-yfDy6chHcM7pXpMF4wycuuV+ILSTG486Z/vLx/Bdi6Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ebe2788eafd539477f83775ef93c3c7e244421d3",
|
||||
"lastModified": 1758998580,
|
||||
"narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@@ -625,11 +722,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735882644,
|
||||
"narHash": "sha256-3FZAG+pGt3OElQjesCAWeMkQ7C/nB1oTHLRQ8ceP110=",
|
||||
"lastModified": 1763319842,
|
||||
"narHash": "sha256-YG19IyrTdnVn0l3DvcUYm85u3PaqBt6tI6VvolcuHnA=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "a5a961387e75ae44cc20f0a57ae463da5e959656",
|
||||
"rev": "7275fa67fbbb75891c16d9dee7d88e58aea2d761",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -640,12 +737,38 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"dankMaterialShell": "dankMaterialShell",
|
||||
"dms-cli": "dms-cli",
|
||||
"home-manager": "home-manager",
|
||||
"hyprland": "hyprland",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nix4vscode": "nix4vscode",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"stylix": "stylix"
|
||||
"sops-nix": "sops-nix",
|
||||
"stylix": "stylix",
|
||||
"watt": "watt",
|
||||
"zen-browser": "zen-browser"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763509310,
|
||||
"narHash": "sha256-s2WzTAD3vJtPACBCZXezNUMTG/wC6SFsU9DxazB9wDI=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "3ee33c0ed7c5aa61b4e10484d2ebdbdc98afb03e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"stylix": {
|
||||
@@ -655,28 +778,29 @@
|
||||
"base16-helix": "base16-helix",
|
||||
"base16-vim": "base16-vim",
|
||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils",
|
||||
"git-hooks": "git-hooks",
|
||||
"flake-parts": "flake-parts",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"systems": "systems_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nur": "nur",
|
||||
"systems": "systems_3",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-tmux": "tinted-tmux"
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
"tinted-tmux": "tinted-tmux",
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741703235,
|
||||
"narHash": "sha256-3efck7239JPh6IHnqhETaoQejfxh4RBU16bE8IHOkto=",
|
||||
"owner": "danth",
|
||||
"lastModified": 1763497248,
|
||||
"narHash": "sha256-OGP6MYc+lVkLVQOTS6ORszDcCnZm7kDOGpFBdDoLd0k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "stylix",
|
||||
"rev": "4a3ac9e30cd15b25a8b2e6cf0a7a047f454408bd",
|
||||
"rev": "f19ac46f6aa26188b2020ed40066a5b832be9c53",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "danth",
|
||||
"ref": "release-24.11",
|
||||
"owner": "nix-community",
|
||||
"repo": "stylix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -697,6 +821,22 @@
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
@@ -731,28 +871,43 @@
|
||||
"tinted-kitty": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716423189,
|
||||
"narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=",
|
||||
"lastModified": 1735730497,
|
||||
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "eb39e141db14baef052893285df9f266df041ff8",
|
||||
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "eb39e141db14baef052893285df9f266df041ff8",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1757716333,
|
||||
"narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"rev": "317a5e10c35825a6c905d912e480dfe8e71c7559",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1740877430,
|
||||
"narHash": "sha256-zWcCXgdC4/owfH/eEXx26y5BLzTrefjtSLFHWVD5KxU=",
|
||||
"lastModified": 1757811970,
|
||||
"narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"rev": "d48ee86394cbe45b112ba23ab63e33656090edb4",
|
||||
"rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -761,6 +916,43 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-zed": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1757811247,
|
||||
"narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"watt": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749377316,
|
||||
"narHash": "sha256-hw3rL4rlIlYJMTeE7DlQ3lRhQDJURAhE+PC/NT4VAAQ=",
|
||||
"owner": "NotAShelf",
|
||||
"repo": "watt",
|
||||
"rev": "154724c7b1bd49654ea55df719e1eb3219ec2000",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NotAShelf",
|
||||
"ref": "v0.3.2",
|
||||
"repo": "watt",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
@@ -789,11 +981,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1734907020,
|
||||
"narHash": "sha256-p6HxwpRKVl1KIiY5xrJdjcEeK3pbmc///UOyV6QER+w=",
|
||||
"lastModified": 1761431178,
|
||||
"narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "d7f18dda5e511749fa1511185db3536208fb1a63",
|
||||
"rev": "4b8801228ff958d028f588f0c2b911dbf32297f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -801,6 +993,27 @@
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zen-browser": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763521945,
|
||||
"narHash": "sha256-Zcrafbe4niRJMbzaVOwg7+iedJhwBFttre2DpyCC6qA=",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "24d7381b9231c23daceec5d372cc28e877f7785d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
191
flake.nix
191
flake.nix
@@ -1,74 +1,173 @@
|
||||
{
|
||||
description = "Nix config entry point";
|
||||
|
||||
# since secrets live in a submodule, enable submodules by default
|
||||
inputs.self.submodules = true;
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Managing flatpak apps
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||
|
||||
# hyprland, plugins and related utils
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
stylix.url = "github:danth/stylix/release-24.11";
|
||||
|
||||
stylix = {
|
||||
url = "github:nix-community/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
# zen browser
|
||||
zen-browser = {
|
||||
url = "github:0xc000022070/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# secrets
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# quickshell
|
||||
dms-cli = {
|
||||
url = "github:AvengeMedia/danklinux";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
dankMaterialShell = {
|
||||
url = "github:AvengeMedia/DankMaterialShell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.dms-cli.follows = "dms-cli";
|
||||
};
|
||||
|
||||
nix4vscode = {
|
||||
url = "github:nix-community/nix4vscode";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
stylix,
|
||||
sops-nix,
|
||||
nix4vscode,
|
||||
...
|
||||
} @ inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
username = "remy";
|
||||
name = "Rémy";
|
||||
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
systems = {
|
||||
# HP Spectre x360 2018
|
||||
Nixtre = {
|
||||
hostModules = [
|
||||
./hosts/spectre-x360-2018
|
||||
];
|
||||
userModules = [
|
||||
./users/remy_spectre
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
extraModules = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
|
||||
# Portable usb stick
|
||||
nichts = {
|
||||
hostModules = [
|
||||
./hosts/mobile-usb
|
||||
];
|
||||
userModules = [
|
||||
./users/remy_usb
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
extraModules = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
};
|
||||
|
||||
# Lenovo yoga 7 pro
|
||||
nyx = {
|
||||
hostModules = [
|
||||
./hosts/yoga-7-pro
|
||||
];
|
||||
userModules = [
|
||||
./users/remy_yoga
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
inputs.dankMaterialShell.homeModules.dankMaterialShell.default
|
||||
|
||||
];
|
||||
extraModules = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
{ nixpkgs.overlays = [ inputs.nix4vscode.overlays.default ]; }
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
# For each entry in `systems` create a nixosConfiguration
|
||||
nixosConfigurations = lib.mapAttrs (_name: cfg:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs pkgs-unstable; };
|
||||
modules =
|
||||
cfg.hostModules ++
|
||||
cfg.extraModules ++
|
||||
[ home-manager.nixosModules.home-manager {
|
||||
# Common home-manager flags
|
||||
home-manager = {
|
||||
backupFileExtension = ".backup";
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs pkgs-unstable; };
|
||||
};
|
||||
|
||||
## NixOS configurations are the main output of this flake
|
||||
# HP Spectre x360 2018
|
||||
nixosConfigurations.spectre = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
# Merge in all the user fragments for this host
|
||||
home-manager.users.remy = lib.mkMerge cfg.userModules;
|
||||
}
|
||||
]
|
||||
;
|
||||
}
|
||||
) systems;
|
||||
|
||||
modules = [
|
||||
./hosts/spectre-x360-2018
|
||||
stylix.nixosModules.stylix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
|
||||
home-manager.users.remy.imports = [
|
||||
./users/remy.nix
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
];
|
||||
}
|
||||
# ## Useful nix build tools
|
||||
# # iso builder TODO
|
||||
# nixosConfigurations.bcachefs-iso = nixpkgs.lib.nixosSystem {
|
||||
# system = "x86_64-linux";
|
||||
# modules = [
|
||||
# "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
|
||||
# ({ lib, pkgs, ... }: {
|
||||
# boot.supportedFilesystems = [ "bcachefs" ];
|
||||
# boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest;
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
|
||||
# devshell for this configuration
|
||||
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
|
||||
packages = [
|
||||
pkgs.sops
|
||||
];
|
||||
};
|
||||
|
||||
# nixosConfigurations.raspberry-pi = nixpkgs.lib.nixosSystem {
|
||||
# system = "aarch64-linux";
|
||||
# modules = [
|
||||
# ./hosts/raspberry-pi/configuration.nix
|
||||
# ];
|
||||
# };
|
||||
|
||||
## Home Manager configurations here?
|
||||
|
||||
|
||||
## Useful nix build tools
|
||||
# iso builder TODO
|
||||
nixosConfigurations.bcachefs-iso = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal-new-kernel-no-zfs.nix"
|
||||
({ lib, pkgs, ... }: {
|
||||
boot.supportedFilesystems = [ "bcachefs" ];
|
||||
boot.kernelPackages = lib.mkOverride 0 pkgs.linuxPackages_latest;
|
||||
})
|
||||
];
|
||||
# tell sops where the public ssh key to "seed" the age key from is located
|
||||
SOPS_AGE_SSH_PRIVATE_KEY_FILE = "/home/remy/.ssh/main_key";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
10
hosts/mobile-usb/configuration.nix
Normal file
10
hosts/mobile-usb/configuration.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
39
hosts/mobile-usb/default.nix
Normal file
39
hosts/mobile-usb/default.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{lib, config, options, pkgs, ...}:
|
||||
{
|
||||
config = {
|
||||
nix-config = {
|
||||
networking.hostName = "nichts";
|
||||
|
||||
userName = "remy";
|
||||
gnome.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Merge the configuration and hardware configuration
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
|
||||
# ../../modules/nixos/backup.nix
|
||||
../../modules/nixos/bluetooth.nix
|
||||
../../modules/nixos/flakes.nix
|
||||
../../modules/nixos/flatpak.nix
|
||||
../../modules/nixos/fonts.nix
|
||||
../../modules/nixos/gnome.nix
|
||||
../../modules/nixos/language.nix
|
||||
../../modules/nixos/ld.nix
|
||||
../../modules/nixos/monitoring.nix
|
||||
../../modules/nixos/networking.nix
|
||||
../../modules/nixos/nh.nix
|
||||
../../modules/nixos/pipewire.nix
|
||||
../../modules/nixos/podman.nix
|
||||
../../modules/nixos/power.nix
|
||||
../../modules/nixos/stylix.nix
|
||||
../../modules/nixos/user.nix
|
||||
|
||||
../../utils/binary-cache.nix
|
||||
../../utils/garbage-collection.nix
|
||||
../../utils/unfree.nix
|
||||
];
|
||||
}
|
||||
|
||||
40
hosts/mobile-usb/hardware-configuration.nix
Normal file
40
hosts/mobile-usb/hardware-configuration.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/621498e8-64f6-4979-8489-3dc1d145e349";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."root-enc".device = "/dev/disk/by-uuid/156d0f15-397c-4bc6-8f57-026108975246";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B2D0-672E";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
17
hosts/mobile-usb/usb_config.nix
Normal file
17
hosts/mobile-usb/usb_config.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.loader.grub.enable = true;
|
||||
|
||||
boot.loader.grub.efiSupport = true;
|
||||
# location at install time. Since the drive is a USB drive this is expcected to change on each device
|
||||
boot.loader.grub.device = "/dev/sdb";
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
boot.tmp.useTmpfs = true;
|
||||
}
|
||||
@@ -9,8 +9,10 @@
|
||||
../../modules/nixos/flatpak.nix
|
||||
../../modules/nixos/fonts.nix
|
||||
../../modules/nixos/hyprland.nix
|
||||
../../modules/nixos/ld.nix
|
||||
../../modules/nixos/monitoring.nix
|
||||
../../modules/nixos/networking.nix
|
||||
../../modules/nixos/nh.nix
|
||||
../../modules/nixos/nvidia.nix
|
||||
../../modules/nixos/pipewire.nix
|
||||
../../modules/nixos/podman.nix
|
||||
|
||||
14
hosts/yoga-7-pro/README.md
Normal file
14
hosts/yoga-7-pro/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
Installed using
|
||||
```
|
||||
> sudo nixos-install --root /tmp/new-install/ --flake .#nyx --impure --no-root-passwd
|
||||
```
|
||||
|
||||
where `/tmp/new-install` was the mount point of the target FS.
|
||||
|
||||
The root user is effectively deactivated, hence the additional setup:
|
||||
- users are part of the `wheel` group
|
||||
- password needs to be set before first boot:
|
||||
- `nix-enter --root /tmp/new-install`
|
||||
- `passwd <username>`
|
||||
|
||||
|
||||
31
hosts/yoga-7-pro/configuration.nix
Normal file
31
hosts/yoga-7-pro/configuration.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
timeout = 0;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
services.logind.settings.Login = {
|
||||
# because it is so inconveniently located
|
||||
HandlePowerKey = "ignore";
|
||||
|
||||
# handled by the dm instead
|
||||
# HandleLidSwitch = "ignore"; # needs to be set because it is not passed to other events
|
||||
HandleLidSwitchDocked = "ignore";
|
||||
};
|
||||
|
||||
|
||||
# requires too many shenanigans so I just install using --no-root-passwd
|
||||
# users.users.root.hashedPassword = "!";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
38
hosts/yoga-7-pro/default.nix
Normal file
38
hosts/yoga-7-pro/default.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
config = {
|
||||
nix-config = {
|
||||
networking.hostName = "nyx";
|
||||
|
||||
userName = "remy";
|
||||
};
|
||||
};
|
||||
|
||||
# Merge the configuration and hardware configuration
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../modules/nixos/backup.nix
|
||||
../../modules/nixos/bluetooth.nix
|
||||
../../modules/nixos/flakes.nix
|
||||
../../modules/nixos/flatpak.nix
|
||||
../../modules/nixos/fonts.nix
|
||||
../../modules/nixos/hyprland.nix
|
||||
../../modules/nixos/language.nix
|
||||
../../modules/nixos/ld.nix
|
||||
../../modules/nixos/monitoring.nix
|
||||
../../modules/nixos/networking.nix
|
||||
../../modules/nixos/nh.nix
|
||||
../../modules/nixos/pipewire.nix
|
||||
../../modules/nixos/podman.nix
|
||||
../../modules/nixos/power.nix
|
||||
../../modules/nixos/sops.nix
|
||||
../../modules/nixos/stylix.nix
|
||||
../../modules/nixos/user.nix
|
||||
|
||||
../../utils/binary-cache.nix
|
||||
../../utils/garbage-collection.nix
|
||||
../../utils/unfree.nix
|
||||
];
|
||||
}
|
||||
|
||||
81
hosts/yoga-7-pro/hardware-configuration.nix
Normal file
81
hosts/yoga-7-pro/hardware-configuration.nix
Normal file
@@ -0,0 +1,81 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
];
|
||||
|
||||
# https://github.com/lwfinger/rtw89/issues/240
|
||||
# boot.extraModprobeConfig = ''
|
||||
# options rtw89_pci disable_aspm_l1ss=y disable_aspm_l1=y disable_clkreq=y
|
||||
# options rtw89_core disable_ps_mode=y
|
||||
# '';
|
||||
|
||||
# ipu is apparently required to make the webcam available as a camera device
|
||||
hardware.ipu6 = {
|
||||
enable = true;
|
||||
platform = "ipu6";
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/1ea0784c-4eeb-46f1-a0ae-f6b311b27bd1";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-root" = {
|
||||
device = "/dev/disk/by-uuid/8832c090-9ca7-4a9c-8cfd-cf43cb59b3d3";
|
||||
crypttabExtraOpts = [ "fido2-token=auto" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/86C2-FD4D";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/1ea0784c-4eeb-46f1-a0ae-f6b311b27bd1";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@home" ];
|
||||
};
|
||||
|
||||
# TODO - only enable this if the user remy exists
|
||||
fileSystems."/scratch/${config.nix-config.userName}" =
|
||||
{ device = "/dev/disk/by-uuid/1ea0784c-4eeb-46f1-a0ae-f6b311b27bd1";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"subvol=@scratch"
|
||||
# Even though the mount point is not in home, we still want to show it in gnome-related file managers
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=scratch"
|
||||
"x-gvfs-icon=view-refresh"
|
||||
];
|
||||
# TODO make it owned by the user
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
# Add a udev rule that launches a backup using restic when a specific USB device (the backup drive) is plugged in
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
restic
|
||||
];
|
||||
|
||||
# the udev rule:
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="backup-restic", TAG+="systemd", ENV{SYSTEMD_WANTS}="backup-restic.service"
|
||||
'';
|
||||
|
||||
# the systemd service:
|
||||
systemd.services.backup-restic = {
|
||||
description = "Backup using restic (triggered when USB drive is plugged in)";
|
||||
after = [ "local-fs.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
# TODO: adapt command
|
||||
ExecStart = "${pkgs.restic}/bin/restic backup /home/username";
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/home-manager/bluetooth-picker.nix
Normal file
9
modules/home-manager/bluetooth-picker.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.rofi-bluetooth
|
||||
];
|
||||
|
||||
# patch the rofi-bluetooth script to use an alternative rofi-command variable
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{pkgs, ...}:
|
||||
{pkgs, inputs, ...}:
|
||||
{
|
||||
programs.firefox = {
|
||||
## Enable the Firefox web browser
|
||||
@@ -28,9 +28,9 @@
|
||||
profiles.default = {
|
||||
search = {
|
||||
force = true;
|
||||
default = "DuckDuckGo";
|
||||
privateDefault = "DuckDuckGo";
|
||||
order = ["DuckDuckGo" "Google"];
|
||||
default = "ddg";
|
||||
privateDefault = "ddg";
|
||||
order = ["ddg" "google"];
|
||||
};
|
||||
settings = {
|
||||
"browser.startup.homepage" = "about:home";
|
||||
@@ -72,9 +72,73 @@
|
||||
# Automatically enable extensions
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
inputs.zen-browser.packages."${system}".default
|
||||
|
||||
# inputs.zen-browser.packages."${system}".default.override {
|
||||
# policies = {
|
||||
# DisableAppUpdate = true;
|
||||
# DisableTelemetry = true;
|
||||
|
||||
# OfferToSaveLogins = false;
|
||||
# AutofillAddressEnabled = true;
|
||||
# AutofillCreditCardEnabled = false;
|
||||
# # BlockAboutConfig = true;
|
||||
|
||||
# DefaultDownloadDirectory = "\${home}/Downloads";
|
||||
|
||||
# ExtensionSettings = with builtins;
|
||||
# let extension = shortId: uuid: {
|
||||
# name = uuid;
|
||||
# value = {
|
||||
# install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||
# installation_mode = "normal_installed";
|
||||
# };
|
||||
# };
|
||||
# in listToAttrs [
|
||||
# (extension "ublock-origin" "uBlock0@raymondhill.net")
|
||||
# (extension "ghostery" "firefox@ghostery.com")
|
||||
# (extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
|
||||
# (extension "morphine" "{b252db54-e4f6-440f-914a-1f017a3a390d}")
|
||||
# ];
|
||||
# };
|
||||
# }
|
||||
|
||||
];
|
||||
# programs.zen-browser = {
|
||||
# enable = true;
|
||||
|
||||
# policies = {
|
||||
# DisableAppUpdate = true;
|
||||
# DisableTelemetry = true;
|
||||
|
||||
# OfferToSaveLogins = false;
|
||||
# AutofillAddressEnabled = true;
|
||||
# AutofillCreditCardEnabled = false;
|
||||
# # BlockAboutConfig = true;
|
||||
|
||||
# DefaultDownloadDirectory = "\${home}/Downloads";
|
||||
|
||||
# ExtensionSettings = with builtins;
|
||||
# let extension = shortId: uuid: {
|
||||
# name = uuid;
|
||||
# value = {
|
||||
# install_url = "https://addons.mozilla.org/en-US/firefox/downloads/latest/${shortId}/latest.xpi";
|
||||
# installation_mode = "normal_installed";
|
||||
# };
|
||||
# };
|
||||
# in listToAttrs [
|
||||
# (extension "ublock-origin" "uBlock0@raymondhill.net")
|
||||
# (extension "ghostery" "firefox@ghostery.com")
|
||||
# (extension "keepassxc-browser" "keepassxc-browser@keepassxc.org")
|
||||
# (extension "morphine" "{b252db54-e4f6-440f-914a-1f017a3a390d}")
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
}
|
||||
|
||||
@@ -1,120 +1,181 @@
|
||||
{pkgs, ...}:
|
||||
let
|
||||
baseExtensions = pkgs.nix4vscode.forVscode [
|
||||
# QOL
|
||||
"mhutchie.git-graph"
|
||||
"redhat.vscode-yaml"
|
||||
# Nix environment selector
|
||||
"arrterian.nix-env-selector"
|
||||
# continue.continue
|
||||
"github.copilot"
|
||||
"github.copilot-chat"
|
||||
];
|
||||
|
||||
baseSettings = {
|
||||
# visual
|
||||
"window.titleBarStyle" = "native";
|
||||
"window.customTitleBarVisibility" = "never";
|
||||
"window.menuBarVisibility" = "hidden";
|
||||
|
||||
"window.autoDetectColorScheme" = true;
|
||||
"workbench.preferredDarkColorTheme" = "Default Dark Modern";
|
||||
"workbench.preferredLightColorTheme" = "Default Light Modern";
|
||||
|
||||
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'monospace', monospace";
|
||||
"terminal.integrated.fontFamily" = "FiraCode Nerd Font Mono";
|
||||
"workbench.iconTheme" = "vs-seti";
|
||||
|
||||
# telemetry
|
||||
"telemetry.telemetryLevel" = "off";
|
||||
"redhat.telemetry.enabled" = false;
|
||||
|
||||
# editor QOL
|
||||
"security.workspace.trust.untrustedFiles" = "open";
|
||||
"editor.wordWrap" = "on";
|
||||
"editor.suggestSelection" = "first";
|
||||
"editor.renderWhitespace" = "none";
|
||||
"editor.acceptSuggestionOnEnter" = "off";
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.inlineSuggest.enabled" = true;
|
||||
"editor.bracketPairColorization.enabled" = true;
|
||||
"editor.unicodeHighlight.nonBasicASCII" = false;
|
||||
"editor.unicodeHighlight.invisibleCharacters" = false;
|
||||
"editor.unicodeHighlight.ambiguousCharacters" = false;
|
||||
|
||||
"files.autoSave" = "onWindowChange";
|
||||
"files.autoSaveDelay" = 1000;
|
||||
"files.insertFinalNewline" = true;
|
||||
"files.trimTrailingWhitespace" = true;
|
||||
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"terminal.integrated.enableMultiLinePasteWarning" = false;
|
||||
"update.showReleaseNotes" = false;
|
||||
"terminal.external.linuxExec" = "kitty";
|
||||
"workbench.startupEditor" = "newUntitledFile";
|
||||
|
||||
# Extension management
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
"extensions.ignoreRecommendations" = true;
|
||||
|
||||
# git
|
||||
"git.ignoreMissingGitWarning" = true;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.autofetch" = true;
|
||||
"diffEditor.renderSideBySide" = false;
|
||||
"diffEditor.hideUnchangedRegions.enabled" = true;
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
|
||||
# Copilot
|
||||
"github.copilot.editor.enableAutoCompletions" = true;
|
||||
"github.copilot.advanced" = {};
|
||||
"github.copilot.enable" = {
|
||||
"*" = true;
|
||||
};
|
||||
|
||||
# Python
|
||||
"python.terminal.activateEnvironment" = false; # let nix-shell handle this
|
||||
};
|
||||
|
||||
baseKeybindings = [
|
||||
# comment/uncomment line
|
||||
{
|
||||
key = "ctrl+[Backslash]"; # was ctrl+# but vscode reads the key differently apparently
|
||||
command = "editor.action.commentLine";
|
||||
when = "editorTextFocus";
|
||||
}
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
|
||||
# profiles = {
|
||||
# default = {
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
# QOL
|
||||
mhutchie.git-graph
|
||||
redhat.vscode-yaml
|
||||
github.copilot
|
||||
|
||||
# python
|
||||
ms-python.python
|
||||
ms-python.isort
|
||||
ms-python.debugpy
|
||||
ms-python.vscode-pylance
|
||||
|
||||
# Nix language
|
||||
jnoortheen.nix-ide
|
||||
|
||||
# typst
|
||||
myriad-dreamin.tinymist
|
||||
];
|
||||
# };
|
||||
|
||||
keybindings = [
|
||||
{
|
||||
key = "ctrl+#";
|
||||
command = "editor.action.commentLine";
|
||||
when = "editorTextFocus";
|
||||
}
|
||||
];
|
||||
|
||||
userSettings = {
|
||||
# visual
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
|
||||
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'monospace', monospace";
|
||||
"terminal.integrated.fontFamily" = "FiraCode Nerd Font Mono";
|
||||
"workbench.iconTheme" = "vs-seti";
|
||||
|
||||
# telemetry
|
||||
"telemetry.enableCrashReporter" = false;
|
||||
"telemetry.enableTelemetry" = false;
|
||||
"redhat.telemetry.enabled" = false;
|
||||
|
||||
|
||||
# editor QOL
|
||||
"security.workspace.trust.untrustedFiles" = "open";
|
||||
"editor.wordWrap" = "on";
|
||||
"editor.suggestSelection" = "first";
|
||||
"editor.renderWhitespace" = "none";
|
||||
"editor.acceptSuggestionOnEnter" = "off";
|
||||
"editor.fontLigatures" = true;
|
||||
"editor.inlineSuggest.enabled" = true;
|
||||
"editor.bracketPairColorization.enabled" = true;
|
||||
"editor.unicodeHighlight.nonBasicASCII" = false;
|
||||
"editor.unicodeHighlight.invisibleCharacters" = false;
|
||||
"editor.unicodeHighlight.ambiguousCharacters" = false;
|
||||
|
||||
"files.autoSave" = "onWindowChange";
|
||||
"files.autoSaveDelay" = 1000;
|
||||
"files.insertFinalNewline" = true;
|
||||
"files.trimTrailingWhitespace" = true;
|
||||
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"terminal.integrated.enableMultiLinePasteWarning" = false;
|
||||
"update.showReleaseNotes" = false;
|
||||
"terminal.external.linuxExec" = "kitty";
|
||||
"workbench.startupEditor" = "newUntitledFile";
|
||||
# "workbench.colorTheme" = "Default Light+";
|
||||
"github.copilot.editor.enableAutoCompletions" = true;
|
||||
"github.copilot.advanced" = {};
|
||||
"github.copilot.enable" = {
|
||||
"*" = true;
|
||||
profiles.default = {
|
||||
userSettings = baseSettings // {
|
||||
"window.newWindowProfile" = "development";
|
||||
};
|
||||
extensions = [];
|
||||
};
|
||||
|
||||
# git
|
||||
"git.ignoreMissingGitWarning" = true;
|
||||
"git.confirmSync" = false;
|
||||
"git.enableSmartCommit" = true;
|
||||
"git.autofetch" = true;
|
||||
"diffEditor.renderSideBySide" = false;
|
||||
"diffEditor.hideUnchangedRegions.enabled" = true;
|
||||
"diffEditor.ignoreTrimWhitespace" = false;
|
||||
profiles.development = {
|
||||
extensions = baseExtensions ++ pkgs.nix4vscode.forVscode [
|
||||
# python
|
||||
"ms-python.python"
|
||||
"ms-python.isort"
|
||||
"ms-python.debugpy"
|
||||
"ms-python.vscode-pylance"
|
||||
|
||||
# nix language
|
||||
"jnoortheen.nix-ide"
|
||||
|
||||
# Flutter and co
|
||||
"dart-code.flutter"
|
||||
"dart-code.dart-code"
|
||||
|
||||
# Python
|
||||
"jupyter.disableJupyterAutoStart" = true;
|
||||
"jupyter.askForKernelRestart" = false;
|
||||
"workbench.editorAssociations" = {
|
||||
"*.ipynb" = "jupyter-notebook";
|
||||
};
|
||||
"notebook.cellToolbarLocation" = {
|
||||
"default" = "right";
|
||||
"jupyter-notebook" = "left";
|
||||
};
|
||||
"jupyter.widgetScriptSources" = [
|
||||
"jsdelivr.com"
|
||||
"unpkg.com"
|
||||
];
|
||||
|
||||
keybindings = baseKeybindings;
|
||||
|
||||
# Typst
|
||||
"[typst]" = {
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"[typst-code]" = {
|
||||
"git.openRepositoryInParentFolders" = "never";
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"tinymist.fontPaths" = [
|
||||
"./font"
|
||||
userSettings = baseSettings;
|
||||
};
|
||||
|
||||
|
||||
profiles.science = {
|
||||
extensions = baseExtensions ++ pkgs.nix4vscode.forVscode [
|
||||
# python + jupyter
|
||||
"ms-python.python"
|
||||
"ms-python.isort"
|
||||
"ms-python.debugpy"
|
||||
"ms-python.vscode-pylance"
|
||||
"ms-toolsai.vscode-jupyter-slideshow"
|
||||
"ms-toolsai.jupyter"
|
||||
"ms-toolsai.jupyter-hub"
|
||||
"ms-toolsai.jupyter-renderers"
|
||||
# Typst
|
||||
"myriad-dreamin.tinymist"
|
||||
];
|
||||
|
||||
keybindings = baseKeybindings ++ [
|
||||
# run code cell in jupyter
|
||||
{
|
||||
key = "ctrl+enter";
|
||||
command = "jupyter.runcurrentcell";
|
||||
when = "editorTextFocus && isWorkspaceTrusted && jupyter.hascodecells && !editorHasSelection && !isCompositeNotebook && !notebookEditorFocused";
|
||||
}
|
||||
];
|
||||
|
||||
userSettings = baseSettings // {
|
||||
"jupyter.disableJupyterAutoStart" = true;
|
||||
"jupyter.askForKernelRestart" = false;
|
||||
"workbench.editorAssociations" = {
|
||||
"*.ipynb" = "jupyter-notebook";
|
||||
};
|
||||
"notebook.cellToolbarLocation" = {
|
||||
"default" = "right";
|
||||
"jupyter-notebook" = "left";
|
||||
};
|
||||
"jupyter.widgetScriptSources" = [
|
||||
"jsdelivr.com"
|
||||
"unpkg.com"
|
||||
];
|
||||
|
||||
# Typst
|
||||
"[typst]" = {
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"[typst-code]" = {
|
||||
"editor.wordSeparators" = "`~!@#$%^&*()=+[{]}\\|;:'\",.<>/?";
|
||||
};
|
||||
"tinymist.fontPaths" = [
|
||||
"./font"
|
||||
];
|
||||
"workbench.colorCustomizations" = {
|
||||
"statusBar.background" = "#003f9293";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
22
modules/home-manager/directories.nix
Normal file
22
modules/home-manager/directories.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Set up essential directories in the home directory
|
||||
# TODO
|
||||
# home.file."Dev".directory = true;
|
||||
# home.file."owncloud".directory = true;
|
||||
|
||||
# Set XDG user directories
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
documents = "${config.home.homeDirectory}/Documents";
|
||||
download = "${config.home.homeDirectory}/Downloads";
|
||||
pictures = "${config.home.homeDirectory}/Pictures";
|
||||
# do not create the following
|
||||
desktop = null;
|
||||
music = null;
|
||||
publicShare = null;
|
||||
templates = null;
|
||||
videos = null;
|
||||
};
|
||||
}
|
||||
@@ -2,6 +2,10 @@
|
||||
{
|
||||
home.packages = [
|
||||
# pdf viewer
|
||||
pkgs.evince
|
||||
pkgs.papers
|
||||
# image viewer
|
||||
pkgs.loupe
|
||||
# video player
|
||||
pkgs.showtime
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,30 +1,32 @@
|
||||
{pkgs, ...}:
|
||||
{pkgs, ...}:
|
||||
{
|
||||
# Required by the fzf fish plugin
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
fd
|
||||
bat
|
||||
];
|
||||
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# enableCompletion = true;
|
||||
generateCompletions = true;
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "fzf-fish";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "PatrickF1";
|
||||
repo = "fzf.fish";
|
||||
rev = "v10.3";
|
||||
sha256 = "sha256-T8KYLA/r/gOKvAivKRoeqIwE2pINlxFQtZJHpOy9GMM=";
|
||||
};
|
||||
}
|
||||
# add others here
|
||||
{ name = "fzf"; src = pkgs.fishPlugins.fzf-fish.src; }
|
||||
{ name = "z"; src = pkgs.fishPlugins.z.src; }
|
||||
{ name = "pure"; src = pkgs.fishPlugins.pure.src; }
|
||||
];
|
||||
|
||||
functions = {
|
||||
# disable the fish greeting
|
||||
fish_greeting = "";
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.fishPlugins.tide
|
||||
];
|
||||
|
||||
# sets the "default" shell to fish
|
||||
# actually keeps bash as a posix-compliant default but starts fish if the shell is not bash
|
||||
@@ -39,4 +41,5 @@
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
services.flatpak.uninstallUnmanaged = false;
|
||||
|
||||
services.flatpak.packages = [
|
||||
"com.calibre_ebook.calibre"
|
||||
"com.github.flxzt.rnote"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"com.spotify.Client"
|
||||
"io.podman_desktop.PodmanDesktop"
|
||||
"org.pipewire.Helvum"
|
||||
"io.github.zen_browser.zen"
|
||||
"im.riot.Riot"
|
||||
"com.valvesoftware.Steam"
|
||||
"org.prismlauncher.PrismLauncher"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{inputs, pkgs, ...}:
|
||||
{
|
||||
# Put a cursor theme to the location expected by the hyprland window manager
|
||||
# TODO
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.nix-config.hypr;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
nix-config.hypr.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Enable an opinionated hyprland+quickshell setup as a desktop environment.";
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./cursor.nix
|
||||
./hyprland-customization.nix
|
||||
./hyprpaper.nix
|
||||
./hyprland
|
||||
./hyprlock.nix
|
||||
./hypridle.nix
|
||||
./waybar.nix
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,34 +4,41 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
|
||||
# See: https://github.com/hyprwm/hypridle/issues/146
|
||||
before_sleep_cmd = "hyprlock --no-fade-in";
|
||||
lock_cmd = "hyprlock";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
# dim screen after 4 minutes
|
||||
timeout = 240;
|
||||
on-timeout = "brightnessctl -s set 10";
|
||||
# set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
# turn off keyboard backlight after 20 seconds
|
||||
timeout = 10;
|
||||
on-timeout = "brightnessctl -d platform::kbd_backlight -s set 0";
|
||||
# restore keyboard backlight on resume to previous level.
|
||||
on-resume = "brightnessctl -d platform::kbd_backlight -r";
|
||||
}
|
||||
{
|
||||
# dim screen after 2 minutes
|
||||
timeout = 120;
|
||||
on-timeout = "brightnessctl -s set 2%";
|
||||
on-resume = "brightnessctl -r";
|
||||
# monitor backlight restore.
|
||||
}
|
||||
{
|
||||
# lock screen after 5 minutes
|
||||
timeout = 300;
|
||||
# lock screen after 10 minutes
|
||||
timeout = 600;
|
||||
on-timeout = "loginctl lock-session && hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
# suspend after 10 minutes
|
||||
timeout = 600;
|
||||
# suspend after 15 minutes
|
||||
timeout = 900;
|
||||
on-timeout = "systemctl suspend";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
{inputs, pkgs, ...}:
|
||||
{
|
||||
|
||||
home.packages = [
|
||||
pkgs.hyprshot
|
||||
pkgs.nautilus
|
||||
pkgs.gnome-control-center
|
||||
pkgs.brightnessctl
|
||||
pkgs.cliphist
|
||||
pkgs.wl-clipboard
|
||||
];
|
||||
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
"$browser" = "firefox";
|
||||
"$launcher-cmd" = "wofi --show drun -n";
|
||||
"$ide" = "code";
|
||||
|
||||
# Global bindings
|
||||
bind = [
|
||||
# Launch applications
|
||||
"$mod, space, exec, $launcher-cmd"
|
||||
"$mod, return, exec, kitty"
|
||||
"$mod, b, exec, $browser"
|
||||
"$mod, s, exec, $ide"
|
||||
"$mod, e, exec, nautilus"
|
||||
|
||||
# Lock screen
|
||||
"$mod, l, exec, hyprlock"
|
||||
|
||||
# Clipboard management
|
||||
"$mod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy"
|
||||
|
||||
"$mod+Shift, Q, killactive," # Close window
|
||||
# Toggle Floating and reduce size
|
||||
"$mod, f, togglefloating,"
|
||||
"$mod, f, resizeactive, 50% 50%,"
|
||||
|
||||
# Alt-tab alternative
|
||||
"$mod, Tab, cyclenext,"
|
||||
"$mod, Tab, bringactivetotop,"
|
||||
|
||||
|
||||
# Move the window
|
||||
"$mod+Shift, left, movewindow, l"
|
||||
"$mod+Shift, right, movewindow, r"
|
||||
"$mod+Shift, up, movewindow, u"
|
||||
"$mod+Shift, down, movewindow, d"
|
||||
|
||||
"$mod+Ctrl, left, movetoworkspace, -1"
|
||||
"$mod+Ctrl, right, movetoworkspace, +1"
|
||||
|
||||
# # Switch workspace
|
||||
# "$mod+Ctrl, left, workspace, -1"
|
||||
# "$mod+Ctrl, right, workspace, +1"
|
||||
|
||||
# Screenshot
|
||||
"$mod, Print, exec, hyprshot -m region -o ~/Pictures/Screenshots"
|
||||
"$mod+Shift, Print, exec, hyprshot -m window -o ~/Pictures/Screenshots"
|
||||
|
||||
];
|
||||
|
||||
# repeatable bindings
|
||||
binde = [
|
||||
# Fn keys
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set -5%"
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
|
||||
# Reshape the window in focus
|
||||
"$mod, left, resizeactive, -2% 0"
|
||||
"$mod, right, resizeactive, 2% 0"
|
||||
|
||||
];
|
||||
|
||||
# lock-screen bindings
|
||||
bindl = [
|
||||
# on lid close, lock the screen
|
||||
# if another monitor is connected, only turn the internal monitor off and don't lock the screen
|
||||
", switch:on:Lid Switch, exec, hyprctl dispatch dpms off eDP-1"
|
||||
# if there is no active monitor, perform a screen lock
|
||||
", switch:on:Lid Switch, exec, hyprctl monitors | grep 'dpmsStatus: 1' || hyprlock"
|
||||
", switch:off:Lid Switch, exec, hyprctl dispatch dpms on eDP-1"
|
||||
];
|
||||
|
||||
# bindr = [
|
||||
# # Overview
|
||||
# "$mod, , overview:toggle"
|
||||
# ];
|
||||
|
||||
bindm = [
|
||||
# move the window
|
||||
"$mod, mouse:272, movewindow"
|
||||
];
|
||||
|
||||
exec-once = [
|
||||
# "${pkgs.hyprpaper}/bin/hyprpaper"
|
||||
# hyprpaper is handled as its own service
|
||||
"${pkgs.waybar}/bin/waybar"
|
||||
# listen to clipboard events and send them to cliphist
|
||||
"wl-paste --watch cliphist store"
|
||||
"${pkgs.waybar}/bin/hypridle"
|
||||
"hyprpaper"
|
||||
# # Fixes cursor themes in gnome apps under hyprland
|
||||
# "gsettings set org.gnome.desktop.interface cursor-theme '${config.home.pointerCursor.name}'"
|
||||
# "gsettings set org.gnome.desktop.interface cursor-size ${toString home.pointerCursor.size}"
|
||||
];
|
||||
|
||||
general = {
|
||||
resize_on_border = true;
|
||||
gaps_in = 5;
|
||||
gaps_out = 5;
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgb(98971A) rgb(CC241D) 45deg";
|
||||
layout = "master";
|
||||
};
|
||||
|
||||
misc = {
|
||||
# disable refreshs when nothing is going on
|
||||
vfr = false;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
# remap caps lock to ctrl
|
||||
kb_options = "ctrl:nocaps";
|
||||
numlock_by_default = true;
|
||||
# mouse input should be unchanged
|
||||
natural_scroll = false;
|
||||
sensitivity = 0.3;
|
||||
touchpad = {
|
||||
disable_while_typing = false;
|
||||
natural_scroll = true;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_fingers = 4;
|
||||
workspace_swipe_touch = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 5;
|
||||
# active_opacity = 0.95;
|
||||
inactive_opacity = 0.9;
|
||||
|
||||
shadow = {
|
||||
enabled = false;
|
||||
};
|
||||
|
||||
# blur is set on a per-program basis
|
||||
windowrulev2 = [
|
||||
# kitty should behave like a floating window
|
||||
"animation popin, class:kitty"
|
||||
"move cursor -50% -50%, class:kitty"
|
||||
"float, class:kitty"
|
||||
"size 50% 50%, class:kitty"
|
||||
|
||||
# some more floating windows
|
||||
"float, class:org.gnome.Settings"
|
||||
"float, class:desktopclient.owncloud.com"
|
||||
"float, class:org.keepassxc.KeePassXC"
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
monitor = [
|
||||
"eDP-1, 3840x2160, 0x0, 1.5" # the internal laptop monitor
|
||||
# Samsung monitor at irchel (matching the description)
|
||||
# "desc:Samsung Electric Company LS27D80xU HK7X800803, 3840x2160, auto-up, 1.5"
|
||||
", preferred, auto-up, auto" # automatically add any newly detected monitor
|
||||
];
|
||||
|
||||
xwayland = {
|
||||
enabled = false;
|
||||
};
|
||||
|
||||
env = [
|
||||
# force apps to use wayland
|
||||
"NIXOS_OZONE_WL, 1"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT, wayland"
|
||||
# set the scale factor for GDK apps
|
||||
"GDK_SCALE, 1.5"
|
||||
# set the scale factor for QT apps
|
||||
"QT_SCALE_FACTOR, 1.5"
|
||||
# set the scale factor for GTK apps
|
||||
];
|
||||
};
|
||||
|
||||
plugins = [
|
||||
# Global overview
|
||||
pkgs.hyprlandPlugins.hyprspace
|
||||
# Touch gestures
|
||||
pkgs.hyprlandPlugins.hyprgrass
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
services.swaync.enable = true;
|
||||
}
|
||||
30
modules/home-manager/hypr/hyprland/autostart.nix
Normal file
30
modules/home-manager/hypr/hyprland/autostart.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{inputs, pkgs, lib, config, ...}:
|
||||
let
|
||||
cfg = config.nix-config.hypr;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
nix-config.hypr.autostartApps = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [
|
||||
"gnome-keyring-daemon --start --components=secrets"
|
||||
"wl-paste --watch cliphist store"
|
||||
"${lib.getExe pkgs.hypridle}"
|
||||
# TODO - currently broken
|
||||
"${pkgs.owncloud-client}"
|
||||
"${lib.getExe pkgs.keepassxc}"
|
||||
];
|
||||
description = "List of applications to start automatically in Hyprland.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
exec-once = cfg.autostartApps;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/home-manager/hypr/hyprland/default.nix
Normal file
10
modules/home-manager/hypr/hyprland/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
imports = [
|
||||
./autostart.nix
|
||||
./general.nix
|
||||
./gestures.nix
|
||||
./keybinds.nix
|
||||
./layouts.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
146
modules/home-manager/hypr/hyprland/general.nix
Normal file
146
modules/home-manager/hypr/hyprland/general.nix
Normal file
@@ -0,0 +1,146 @@
|
||||
{inputs, pkgs, lib, config, ...}:
|
||||
let
|
||||
cfg = config.nix-config.hypr;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
nix-config.hypr.internal-screen.resolution = lib.mkOption { type = lib.types.str; };
|
||||
nix-config.hypr.internal-screen.scale = lib.mkOption { type = lib.types.str; };
|
||||
nix-config.hypr.browser = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "firefox";
|
||||
description = "The browser to use in Hyprland.";
|
||||
};
|
||||
nix-config.hypr.ide = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "code";
|
||||
description = "The IDE to use in Hyprland.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
wayland.windowManager.hyprland = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
# debug = {
|
||||
# disable_logs = false;
|
||||
# };
|
||||
general = {
|
||||
resize_on_border = true;
|
||||
gaps_in = 3;
|
||||
gaps_out = 3;
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgb(98971A) rgb(CC241D) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "master";
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
# remap caps lock to ctrl
|
||||
kb_options = "ctrl:nocaps";
|
||||
numlock_by_default = true;
|
||||
# mouse input should be unchanged
|
||||
natural_scroll = false;
|
||||
sensitivity = 0.3;
|
||||
touchpad = {
|
||||
disable_while_typing = false;
|
||||
natural_scroll = true;
|
||||
};
|
||||
};
|
||||
|
||||
device = {
|
||||
name = "syna329a:00-06cb:cd4f-touchpad";
|
||||
sensitivity = 0.5;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
inactive_opacity = 0.9;
|
||||
dim_inactive = false;
|
||||
dim_strength = 0.1;
|
||||
|
||||
shadow = {
|
||||
enabled = false;
|
||||
};
|
||||
|
||||
# blur = {
|
||||
# enabled = true;
|
||||
# size = 5;
|
||||
# passes = 2;
|
||||
# };
|
||||
|
||||
# blur is set on a per-program basis
|
||||
windowrulev2 = [
|
||||
# kitty should behave like a floating window
|
||||
"animation popin, class:kitty"
|
||||
"move cursor -50% -50%, class:kitty"
|
||||
"float, class:kitty"
|
||||
"size 50% 50%, class:kitty"
|
||||
|
||||
# blur the launcher background
|
||||
# "blur 10, class:${config.nix-config.launcher.name}"
|
||||
|
||||
# some more floating windows
|
||||
"float, class:org.gnome.Settings"
|
||||
"float, class:desktopclient.owncloud.com"
|
||||
"float, class:org.keepassxc.KeePassXC"
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"float, class:org.gnome.Nautilus"
|
||||
# when there is a single window, deactivate border and gaps
|
||||
# "border_size 0, onworkspace:w[tv1], "
|
||||
|
||||
# File pickers and dialogs
|
||||
"float, title:^(Save As)$"
|
||||
"float, title:^(Open File)$"
|
||||
"size 50% 50%, title:^(Open File)$"
|
||||
"center, title:^(Open File)$"
|
||||
|
||||
# Disable idle when gaming
|
||||
"idleinhibit always, class:^(steam_app_)"
|
||||
"idleinhibit always, class:^(gamescope)$"
|
||||
];
|
||||
};
|
||||
|
||||
monitor = [
|
||||
# the internal monitor, always at the "center"
|
||||
"eDP-1, ${cfg.internal-screen.resolution}, 0x0, ${cfg.internal-screen.scale}"
|
||||
|
||||
# ultra wide monitor at home
|
||||
"desc:Samsung Electric Company C34H89x H4ZN501178, 3440x1440@99.98, auto-up, 1"
|
||||
|
||||
# Samsung monitors at irchel (matching the description)
|
||||
"desc:Samsung Electric Company LS27D80xU, 2560x1440@59.95, auto-up, 1"
|
||||
|
||||
", preferred, auto-up, auto" # automatically add any newly detected monitor
|
||||
];
|
||||
|
||||
xwayland = {
|
||||
enabled = true;
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
env = [
|
||||
# force apps to use wayland
|
||||
"NIXOS_OZONE_WL, 1"
|
||||
"ELECTRON_OZONE_PLATFORM_HINT, wayland"
|
||||
# set the scale factor for GDK apps
|
||||
"GDK_SCALE, ${cfg.internal-screen.scale}"
|
||||
# set the scale factor for QT apps
|
||||
# "QT_SCALE_FACTOR, ${cfg.internal-screen.scale}"
|
||||
"QT_SCALE_FACTOR, 1.1"
|
||||
# set the scale factor for GTK apps
|
||||
];
|
||||
};
|
||||
|
||||
plugins = [
|
||||
# Global overview
|
||||
pkgs.hyprlandPlugins.hyprspace
|
||||
# Touch gestures
|
||||
# pkgs.hyprlandPlugins.hyprgrass
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
21
modules/home-manager/hypr/hyprland/gestures.nix
Normal file
21
modules/home-manager/hypr/hyprland/gestures.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{inputs, pkgs, lib, config, ...}:
|
||||
let
|
||||
cfg = config.nix-config.hypr;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
gesture = [
|
||||
# 4 finger swipe to switch workspace
|
||||
"4, horizontal, workspace"
|
||||
|
||||
"3, up, fullscreen"
|
||||
"3, down, float"
|
||||
|
||||
"4, vertical, scale: 0.5, special, magic"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
135
modules/home-manager/hypr/hyprland/keybinds.nix
Normal file
135
modules/home-manager/hypr/hyprland/keybinds.nix
Normal file
@@ -0,0 +1,135 @@
|
||||
# Note that some keybindings are delegated to other components, e.g. the quickshell module
|
||||
{inputs, pkgs, lib, config, ...}:
|
||||
let
|
||||
cfg = config.nix-config.hypr;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
"$mod" = "SUPER";
|
||||
|
||||
# Global bindings
|
||||
bind = [
|
||||
# Launch applications
|
||||
"$mod, space, exec, ${lib.getExe config.nix-config.launcher}"
|
||||
"$mod, return, exec, kitty"
|
||||
"$mod, b, exec, ${cfg.browser}"
|
||||
"$mod, s, exec, ${cfg.ide}"
|
||||
"$mod, e, exec, ${lib.getExe pkgs.nautilus}"
|
||||
|
||||
# Lock screen
|
||||
"$mod, l, exec, loginctl lock-session"
|
||||
|
||||
# Close window
|
||||
"$mod, Q, killactive,"
|
||||
# Force close window
|
||||
"$mod+Shift, Q, forcekillactive,"
|
||||
|
||||
# Toggle Floating and reduce size
|
||||
"$mod, f, togglefloating,"
|
||||
"$mod, f, resizeactive, 50% 50%,"
|
||||
|
||||
# "$mod, P, pseudo, " # dwindle
|
||||
# "$mod, J, togglesplit, " # dwindle
|
||||
# Toggle fullscreen
|
||||
"$mod+Shift, f, fullscreen,"
|
||||
|
||||
# Alt-tab alternative
|
||||
"$mod, Tab, cyclenext,"
|
||||
"$mod, Tab, bringactivetotop,"
|
||||
|
||||
# Move the window
|
||||
"$mod+Shift, left, movewindow, l"
|
||||
"$mod+Shift, right, movewindow, r"
|
||||
"$mod+Shift, up, movewindow, u"
|
||||
"$mod+Shift, down, movewindow, d"
|
||||
|
||||
# Move window to workspace
|
||||
"$mod+Ctrl, left, movetoworkspace, -1"
|
||||
"$mod+Ctrl, right, movetoworkspace, +1"
|
||||
|
||||
# Switch workspace
|
||||
"$mod, left, workspace, e-1"
|
||||
"$mod, right, workspace, e+1"
|
||||
"$mod, mouse_down, workspace, e-1"
|
||||
"$mod, mouse_up, workspace, e+1"
|
||||
|
||||
|
||||
# move to scratch workspace
|
||||
"$mod+Ctrl, up, movetoworkspace, special:magic"
|
||||
"$mod+Ctrl, down, movetoworkspace, prev"
|
||||
|
||||
# switch to scratch workspace
|
||||
"$mod, up, togglespecialworkspace, magic"
|
||||
"$mod, down, togglespecialworkspace, magic"
|
||||
|
||||
|
||||
# Screenshot
|
||||
"$mod, Print, exec, hyprshot -m region -o ~/Pictures/Screenshots"
|
||||
"$mod+Shift, Print, exec, hyprshot -m window -o ~/Pictures/Screenshots"
|
||||
# # somehow logitech calls this SUPER_L but we refer to it by its code
|
||||
"SUPER_L&Shift_L, S, exec, hyprshot -m region -o ~/Pictures/Screenshots"
|
||||
"Shift&SUPER_L&Shift_L, S, exec, hyprshot -m window -o ~/Pictures/Screenshots"
|
||||
# when there is a dedicated screenshot button
|
||||
", XF86Cut, exec, hyprshot -m region -o ~/Pictures/Screenshots"
|
||||
"Shift, XF86Cut, exec, hyprshot -m window -o ~/Pictures/Screenshots"
|
||||
|
||||
# Other pickers using the same launcher
|
||||
"$mod+Ctrl, space, exec, ${lib.getExe config.nix-config.filePicker}"
|
||||
"$mod, period, exec, ${lib.getExe config.nix-config.emojiPicker}"
|
||||
];
|
||||
|
||||
# repeatable bindings
|
||||
binde = [
|
||||
# Reshape the window in focus
|
||||
"$mod, MINUS, resizeactive, -2% -2%"
|
||||
"$mod, KP_Subtract, resizeactive, -2% -2%"
|
||||
"$mod, PLUS, resizeactive, 2% 2%"
|
||||
"$mod, KP_Add, resizeactive, 2% 2%"
|
||||
];
|
||||
|
||||
# lock-screen bindings
|
||||
bindl = [
|
||||
", XF86PowerOff, exec, hyprctl dispatch dpms on eDP-1"
|
||||
## depending on the setup we expect different behaviors when closing the lid:
|
||||
# either sleep & lock screen OR switch to clamshell mode
|
||||
# through the `services.logind.lidSwitch` and `services.logind.lidSwitchDocked` we can differentiate both cases
|
||||
# when not docked, the system is put to sleep and the screen is implicitly locked as per the hypridle configuration
|
||||
# when docked, the lid switch is ignored by logind and needs to be handled manually, see below:
|
||||
|
||||
|
||||
# if an additional monitor is detected, simply deactivate the internal screen and continue working on the external monitor
|
||||
", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1,disable"
|
||||
## on reopening the lid, turn the internal screen back on
|
||||
", switch:off:Lid Switch, exec, hyprctl dispatch dpms on eDP-1"
|
||||
# we need to reload the monitor configuration so that the internal screen is turned back on
|
||||
", switch:off:Lid Switch, exec, hyprctl reload"
|
||||
];
|
||||
|
||||
# bindr = [
|
||||
# # Overview
|
||||
# "$mod, , overview:toggle"
|
||||
# ];
|
||||
|
||||
bindm = [
|
||||
# move the window using left click
|
||||
"$mod, mouse:272, movewindow"
|
||||
# resize the window using right click
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
# extraConfig = ''
|
||||
# bind= , XF86AudioMicMute, submap, player_submap
|
||||
|
||||
# submap=player_submap
|
||||
# bind=, XF86AudioRaiseVolume, exec, notify-send previous; hyprctl dispatch submap reset
|
||||
# bind=, XF86AudioLowerVolume, exec, notify-send next; hyprctl dispatch submap reset
|
||||
# bind=, XF86AudioMicMute, exec, notify-send pause; hyprctl dispatch submap reset
|
||||
# submap=reset
|
||||
# '';
|
||||
};
|
||||
};
|
||||
}
|
||||
57
modules/home-manager/hypr/hyprland/layouts.nix
Normal file
57
modules/home-manager/hypr/hyprland/layouts.nix
Normal file
@@ -0,0 +1,57 @@
|
||||
{inputs, pkgs, lib, config, ...}:
|
||||
let
|
||||
cfg = config.nix-config.hypr;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
|
||||
master = {
|
||||
# no_gaps_when_only = true;
|
||||
|
||||
# default: single app is centered/fullscreen; when more apps are added it splits
|
||||
orientation = "right";
|
||||
# keep center-master behaviour when there is exactly 1 slave (i.e. single app appears fullscreen)
|
||||
slave_count_for_center_master = 1;
|
||||
# only split in two columns
|
||||
mfact = 0.6;
|
||||
inherit_fullscreen = false;
|
||||
};
|
||||
|
||||
# #create special workspaces with no gaps
|
||||
# workspace = [
|
||||
# "w[t1], gapsout:0, gapsin:0"
|
||||
# "w[tg1], gapsout:0, gapsin:0"
|
||||
# "f[1], gapsout:0, gapsin:0"
|
||||
# ];
|
||||
|
||||
# # automatically assign windows to workspaces when there is only one window
|
||||
# windowrulev2 = [
|
||||
# "bordersize 0, floating:0, onworkspace:w[t1]"
|
||||
# "rounding 0, floating:0, onworkspace:w[t1]"
|
||||
# "bordersize 0, floating:0, onworkspace:w[tg1]"
|
||||
# "rounding 0, floating:0, onworkspace:w[tg1]"
|
||||
# "bordersize 0, floating:0, onworkspace:f[1]"
|
||||
# "rounding 0, floating:0, onworkspace:f[1]"
|
||||
# ];
|
||||
|
||||
misc = {
|
||||
vfr = false;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
# Keybind to toggle between 2 and 3 column master layout
|
||||
bind = [
|
||||
# Toggle master layout between 2 and 3 columns (press $mod + m)
|
||||
"$mod, m, exec, hyprctl dispatch layoutmsg orientationcenter"
|
||||
"$mod, m, exec, hyprctl dispatch layoutmsg mfact exact 0.34"
|
||||
|
||||
# Toggle master layout between 3 and 2 columns (press $mod + Shift + m)
|
||||
"$mod, Shift+m, exec, hyprctl dispatch layoutmsg orientationright"
|
||||
"$mod, Shift+m, exec, hyprctl dispatch layoutmsg mfact exact 0.6"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/home-manager/hypr/hyprland/packages.nix
Normal file
19
modules/home-manager/hypr/hyprland/packages.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{inputs, pkgs, lib, config, ...}:
|
||||
let
|
||||
cfg = config.nix-config.hypr;
|
||||
in
|
||||
{
|
||||
# packages required by the current hyprland setup
|
||||
home.packages = [
|
||||
pkgs.hyprshot
|
||||
pkgs.nautilus
|
||||
pkgs.gnome-control-center
|
||||
pkgs.gnome-bluetooth # needed by gnome-control-center to manage bluetooth
|
||||
pkgs.cliphist
|
||||
pkgs.wl-clipboard
|
||||
pkgs.gcr # Provides org.gnome.keyring.SystemPrompter
|
||||
];
|
||||
|
||||
# Also use gnome keyring
|
||||
services.gnome-keyring.enable = true;
|
||||
}
|
||||
@@ -3,10 +3,14 @@
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
|
||||
|
||||
general = {
|
||||
grace = 5;
|
||||
no_fade_in = false;
|
||||
disable_loading_bar = false;
|
||||
# immediately lock the screen
|
||||
grace = 0;
|
||||
# no_fade_in = false;
|
||||
# disable_loading_bar = false;
|
||||
};
|
||||
|
||||
background = {
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
# # load the wallpapers from the wallpapers directory - this gives a set with the folder content
|
||||
# dirContent = builtins.readDir ../../../wallpapers;
|
||||
# wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers;
|
||||
# # # load each wallpaper and keep its path (now in the nix store) as an array
|
||||
# # wallpapers = map (x: builtins.readDir "${../../../wallpapers}/${x.value}") dirContent;
|
||||
# # wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers;
|
||||
|
||||
# # script that picks a random wallpaper from the array and sets it as the desktop background
|
||||
# monitor = ""; # leave empty to set the wallpaper on all monitors
|
||||
|
||||
# wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" ''
|
||||
# wallpaper=$(shuf -n 1 -e ${wallpaperString})
|
||||
# hyprctl hyprpaper unload all
|
||||
# hyprctl hyprpaper preload $wallpaper
|
||||
# hyprctl hyprpaper wallpaper "${monitor},$wallpaper"
|
||||
# '';
|
||||
|
||||
in {
|
||||
# home.packages = [wallpaperRandomizer];
|
||||
|
||||
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
};
|
||||
# settings = {
|
||||
# ipc = "off";
|
||||
# splash = false;
|
||||
# };
|
||||
# };
|
||||
|
||||
# systemd.user = {
|
||||
# services.wallpaperRandomizer = {
|
||||
# Install = {WantedBy = ["graphical-session.target"];};
|
||||
|
||||
# Unit = {
|
||||
# Description = "Set random desktop background using hyprpaper";
|
||||
# After = ["graphical-session-pre.target"];
|
||||
# PartOf = ["graphical-session.target"];
|
||||
# };
|
||||
|
||||
# Service = {
|
||||
# Type = "oneshot";
|
||||
# ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
|
||||
# IOSchedulingClass = "idle";
|
||||
# };
|
||||
# };
|
||||
|
||||
# timers.wallpaperRandomizer = {
|
||||
# Unit = {Description = "Set random desktop background using hyprpaper on an interval";};
|
||||
|
||||
# Timer = {OnUnitActiveSec = "6h";};
|
||||
|
||||
# Install = {WantedBy = ["timers.target"];};
|
||||
# };
|
||||
# };
|
||||
}
|
||||
@@ -1,211 +0,0 @@
|
||||
{inputs, pkgs, ...}:
|
||||
{
|
||||
# required to autoload fonts from packages installed via Home Manager
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# waybar requires font-awesome
|
||||
home.packages = [
|
||||
pkgs.pavucontrol
|
||||
];
|
||||
|
||||
# enable waybar
|
||||
programs.waybar.enable = true;
|
||||
programs.waybar = {
|
||||
settings = {
|
||||
|
||||
mainBar = {
|
||||
margin-top = 2;
|
||||
margin-bottom = 2;
|
||||
margin-left = 5;
|
||||
margin-right = 5;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
spacing = 5;
|
||||
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
"hyprland/window"
|
||||
];
|
||||
|
||||
modules-center = [
|
||||
"clock"
|
||||
"custom/notification"
|
||||
];
|
||||
|
||||
modules-right = [
|
||||
"tray"
|
||||
# "temperature"
|
||||
# "group/expand"
|
||||
# "bluetooth"
|
||||
"wireplumber"
|
||||
"network"
|
||||
# "mpd"
|
||||
"battery"
|
||||
"backlight"
|
||||
"idle_inhibitor"
|
||||
];
|
||||
|
||||
|
||||
# module specific settings
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
active = "●";
|
||||
default = "○";
|
||||
};
|
||||
};
|
||||
"hyprland/window"= {
|
||||
"icon" = false;
|
||||
"separate-outputs" = true;
|
||||
"format" = "{}";
|
||||
};
|
||||
"clock" = {
|
||||
format = "{:%H:%M}";
|
||||
interval = 1;
|
||||
tooltip-format = "<tt>{calendar}</tt>";
|
||||
calendar = {
|
||||
"format" = {
|
||||
"today" = "<span color='#fAfBfC'><b>{}</b></span>";
|
||||
};
|
||||
};
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
tooltip = "true";
|
||||
};
|
||||
|
||||
"bluetooth" = {
|
||||
format-on = "";
|
||||
format-off = "BT-off";
|
||||
format-disabled = "";
|
||||
format-connected-battery = "{device_battery_percentage}% ";
|
||||
format-alt = "{device_alias} ";
|
||||
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
|
||||
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = "{device_alias}\n{device_address}";
|
||||
tooltip-format-enumerate-connected-battery = "{device_alias}\n{device_address}\n{device_battery_percentage}%";
|
||||
on-click-right = "blueman-manager";
|
||||
};
|
||||
"battery" = {
|
||||
interval = 60;
|
||||
states = {
|
||||
good = 80;
|
||||
warning = 30;
|
||||
critical = 10;
|
||||
};
|
||||
format = "{capacity}% {icon}";
|
||||
format-charging = "{capacity}% ";
|
||||
format-plugged = "{capacity}% ";
|
||||
format-icons = [ "" "" "" "" "" "" ];
|
||||
};
|
||||
"backlight" = {
|
||||
"format" = "{percent}% {icon}";
|
||||
"format-icons" = ["" "" "" "" "" "" "" "" ""];
|
||||
};
|
||||
"wireplumber" = {
|
||||
scroll-step = 10;
|
||||
format = "{icon} {volume}%";# {format_source}";
|
||||
format-bluetooth = "{volume}% {icon}";# {format_source}";
|
||||
format-bluetooth-muted = " {icon}";# {format_source}";
|
||||
format-muted = " Muted";# {format_source}";
|
||||
# format-source = " {volume}%";
|
||||
# format-source-muted = "";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
hands-free = "";
|
||||
headset = "";
|
||||
phone = "";
|
||||
portable = "";
|
||||
default = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
on-click = "XDG_CURRENT_DESKTOP=GNOME gnome-control-center sound";
|
||||
};
|
||||
"tray" = {
|
||||
spacing = 5;
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon} {}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = "";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = "";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = "";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "sleep 0.1 && task-waybar";
|
||||
escape = true;
|
||||
};
|
||||
"network" = {
|
||||
format = "";
|
||||
format-wifi = "{icon} {essid}";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
format-ethernet = " {ipaddr}/{cidr}";
|
||||
format-disconnected = "";
|
||||
tooltip-format = " {ifname} via {gwaddr}";
|
||||
tooltip-format-wifi = "SSID: {essid}({signalStrength}%), {frequency} MHz\nInterface: {ifname}\nIP: {ipaddr}\nGW: {gwaddr}\n\n<span color='#a6da95'>{bandwidthUpBits}</span>\t<span color='#ee99a0'>{bandwidthDownBits}</span>\t<span color='#c6a0f6'>{bandwidthTotalBits}</span>";
|
||||
tooltip-format-ethernet = "{ifname} ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
on-click = "XDG_CURRENT_DESKTOP=GNOME gnome-control-center wifi";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = ''
|
||||
* {
|
||||
font-family: "FiraCode Nerd Font";
|
||||
font-weight: bold;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
|
||||
.module {
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
padding: 5px 5px 5px 5px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
box.module button:hover {
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
.modules-left {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.modules-center {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#battery.warning {
|
||||
background:rgba(240, 165, 0, 0.6);
|
||||
}
|
||||
#battery.critical {
|
||||
background:rgba(255, 0, 0, 0.6);
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
{pkgs, lib, ...}:
|
||||
{pkgs, lib, config, ...}:
|
||||
let
|
||||
stylix = import ./stylix.nix { inherit pkgs; };
|
||||
cfg = config.nix-config.style;
|
||||
in
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
shellIntegration.enableFishIntegration = true;
|
||||
settings = {
|
||||
|
||||
|
||||
# # import the colors from the stylix theme, but keep the background black
|
||||
# color0 = stylix.stylix.base16Scheme.base00;
|
||||
# color8 = stylix.stylix.base16Scheme.base08;
|
||||
@@ -33,16 +35,20 @@ in
|
||||
# color15 = stylix.stylix.base16Scheme.base0F;
|
||||
|
||||
# also reuse the background opacity by stylix
|
||||
background_opacity = stylix.stylix.opacity.terminal;
|
||||
background_opacity = cfg.terminalOpacity;
|
||||
|
||||
background = "#000000";
|
||||
|
||||
font_family = cfg.monospaceFont;
|
||||
font_size = cfg.fontSizes.terminal;
|
||||
confirm_os_window_close = 0;
|
||||
enable_audio_bell = false;
|
||||
cursor_trail = 3;
|
||||
cursor_trail_decay = "0.1 0.4";
|
||||
url_style = "curly";
|
||||
notify_on_cmd_finish = "unfocused";
|
||||
|
||||
window_padding_width = 5;
|
||||
};
|
||||
|
||||
keybindings = {
|
||||
|
||||
@@ -1,8 +1,25 @@
|
||||
{pkgs, ...}:
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.kubie
|
||||
pkgs.kubectl
|
||||
];
|
||||
|
||||
|
||||
|
||||
# Add the shell alias
|
||||
programs.fish.shellAliases = {
|
||||
k = "kubectl";
|
||||
};
|
||||
|
||||
# set the kubectl autocompletions for fish
|
||||
# the fish functions are generated by kubectl itself, we do this at compile time and write them a single time to avoid generating them at each shell start
|
||||
# the command is kubectl completion fish
|
||||
# which becomes
|
||||
programs.fish.completions."kubectl" = builtins.readFile "${pkgs.runCommand "kubectl-completion" {} ''
|
||||
${pkgs.kubectl}/bin/kubectl completion fish > $out
|
||||
''}";
|
||||
|
||||
programs.kubeswitch = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
}
|
||||
|
||||
123
modules/home-manager/launcher.nix
Normal file
123
modules/home-manager/launcher.nix
Normal file
@@ -0,0 +1,123 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.nix-config.style;
|
||||
|
||||
powerMenu = pkgs.writeShellScriptBin "power-menu" ''
|
||||
options=" Power Off\n Reboot\n Lock\n Suspend"
|
||||
selected=$(echo -e "$options" | fuzzel --dmenu --prompt "Power Menu" --lines 4 --width 20)
|
||||
|
||||
case "$selected" in
|
||||
" Power Off") systemctl poweroff ;;
|
||||
" Reboot") systemctl reboot ;;
|
||||
" Lock") hyprlock ;;
|
||||
" Suspend") systemctl suspend ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
'';
|
||||
|
||||
filePicker = pkgs.writeShellScriptBin "file-picker" ''
|
||||
files=$(${lib.getExe pkgs.fd} . $HOME --type f)
|
||||
filesShortened=$(echo "$files" | sed "s|$HOME|~|g" | awk -F/ '{print $(NF)" ("$0")"}')
|
||||
|
||||
selected=$(echo "$filesShortened" | fuzzel --dmenu --prompt "🔎 " --placeholder "File search" --index)
|
||||
|
||||
|
||||
if [ -n "$selected" ]; then
|
||||
# Since fuzzel was launched with the --index option the actual path is now files[selected]
|
||||
selectedPlusOne=$((selected + 1))
|
||||
file=$(echo "$files" | sed -n "''${selectedPlusOne}p")
|
||||
xdg-open "$file"
|
||||
# plus one
|
||||
else
|
||||
echo "No file selected"
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
|
||||
emojiPicker = pkgs.writeShellScriptBin "emoji-picker" ''
|
||||
curl -s https://raw.githubusercontent.com/littleboycoding/emoji-dmenu/refs/heads/master/emoji.txt | fuzzel --dmenu | cut -d ' ' -f 1 | wl-copy
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
options.nix-config = {
|
||||
powerMenu = lib.mkOption {
|
||||
description = "Package to use as a power menu";
|
||||
type = lib.types.package;
|
||||
default = powerMenu;
|
||||
};
|
||||
|
||||
launcher = lib.mkOption {
|
||||
description = "Configuration for the launcher";
|
||||
type = lib.types.package;
|
||||
default = pkgs.fuzzel;
|
||||
};
|
||||
|
||||
filePicker = lib.mkOption {
|
||||
description = "Package to use as a file picker";
|
||||
type = lib.types.package;
|
||||
default = filePicker;
|
||||
};
|
||||
|
||||
emojiPicker = lib.mkOption {
|
||||
description = "Package to use as a emoji picker";
|
||||
type = lib.types.package;
|
||||
default = emojiPicker;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
main = {
|
||||
font = "monospace:size=${builtins.toString (cfg.fontSizes.applications - 1)}";
|
||||
terminal = "${lib.getExe pkgs.kitty}";
|
||||
layer = "overlay"; #or top?
|
||||
use-bold = true;
|
||||
dpi-aware = true;
|
||||
icons-enabled = true;
|
||||
match-mode = "fzf";
|
||||
horizontal-pad = cfg.fontSizes.applications + 5;
|
||||
vertical-pad = cfg.fontSizes.applications + 5;
|
||||
inner-pad = cfg.fontSizes.applications;
|
||||
show-actions = true;
|
||||
lines = 12;
|
||||
width = 50;
|
||||
};
|
||||
|
||||
colors = {
|
||||
background = "000000aa";
|
||||
text = "ffffffaa";
|
||||
|
||||
# prompt
|
||||
|
||||
# placeholder
|
||||
|
||||
# input
|
||||
|
||||
match = "ffffffaa";
|
||||
|
||||
selection = "00000000";
|
||||
|
||||
selection-text = "ffffffbb";
|
||||
|
||||
selection-match = "ffffffaa";
|
||||
};
|
||||
|
||||
border = {
|
||||
width = 0;
|
||||
radius = 15;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
home.packages = with pkgs; [
|
||||
powerMenu
|
||||
filePicker
|
||||
emojiPicker
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{pkgs, ...}:
|
||||
{pkgs, ...}:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.obsidian
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
59
modules/home-manager/quickshell/default.nix
Normal file
59
modules/home-manager/quickshell/default.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.dankMaterialShell.enable = true;
|
||||
|
||||
programs.dankMaterialShell = {
|
||||
enableSystemd = true;
|
||||
enableSystemMonitoring = false;
|
||||
enableClipboard = true;
|
||||
enableVPN = true;
|
||||
enableBrightnessControl = true;
|
||||
enableColorPicker = false;
|
||||
enableDynamicTheming = true;
|
||||
enableAudioWavelength = false;
|
||||
enableCalendarEvents = false;
|
||||
enableSystemSound = true;
|
||||
|
||||
# default = {
|
||||
# settings = ''{}'';
|
||||
# session = ''{}'';
|
||||
# };
|
||||
|
||||
# plugins = {};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
binde = [
|
||||
# Brightness
|
||||
", XF86MonBrightnessDown, exec, dms ipc call brightness decrement 5 \"\""
|
||||
", XF86MonBrightnessUp, exec, dms ipc call brightness increment 5 \"\""
|
||||
|
||||
# Audio volume + playback
|
||||
", XF86AudioMute, exec, dms ipc call audio mute"
|
||||
", XF86AudioLowerVolume, exec, dms ipc call audio decrement 5"
|
||||
", XF86AudioRaiseVolume, exec, dms ipc call audio increment 5"
|
||||
|
||||
"$mod, XF86AudioMute, exec, dms ipc call mpris playPause"
|
||||
"$mod, XF86AudioLowerVolume, exec, dms ipc call mpris previous"
|
||||
"$mod, XF86AudioRaiseVolume, exec, dms ipc call mpris next"
|
||||
# also allow the dedicated media keys to control playback
|
||||
", XF86AudioPlay, exec, dms ipc call mpris playPause"
|
||||
", XF86AudioPrev, exec, dms ipc call mpris previous"
|
||||
", XF86AudioNext, exec, dms ipc call mpris next"
|
||||
|
||||
];
|
||||
|
||||
bind = [
|
||||
", XF86PowerOff, exec, dms ipc call powermenu toggle"
|
||||
# used to be ", XF86PowerOff, exec, ${lib.getExe config.nix-config.powerMenu}"
|
||||
"$mod, V, exec, dms ipc call clipboard toggle"
|
||||
# used to be "$mod, V, exec, cliphist list | ${lib.getExe config.nix-config.launcher} --dmenu | cliphist decode | wl-copy"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
0
modules/home-manager/sops.nix
Normal file
0
modules/home-manager/sops.nix
Normal file
23
modules/home-manager/ssh.nix
Normal file
23
modules/home-manager/ssh.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
programs.ssh.enable = true;
|
||||
programs.ssh.matchBlocks = {
|
||||
"*" = {
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/main_key";
|
||||
};
|
||||
ela = lib.hm.dag.entryBefore ["eiger"] {
|
||||
hostname = "ela.cscs.ch";
|
||||
user = "rmoll";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/cscs-key";
|
||||
identitiesOnly = true;
|
||||
};
|
||||
|
||||
eiger = {
|
||||
hostname = "eiger.cscs.ch";
|
||||
user = "rmoll";
|
||||
identityFile = "${config.home.homeDirectory}/.ssh/cscs-key";
|
||||
identitiesOnly = true;
|
||||
proxyJump = "ela";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,95 +1,182 @@
|
||||
{pkgs, ...}:
|
||||
{pkgs, config, lib, ...}:
|
||||
let
|
||||
cfg = config.nix-config.style;
|
||||
in
|
||||
{
|
||||
stylix = {
|
||||
# Stylix is already enabled since the system is configured to use it
|
||||
# enable = true;
|
||||
# don't theme applications by default
|
||||
autoEnable = false;
|
||||
|
||||
options.nix-config.style = {
|
||||
cursor = {
|
||||
package = pkgs.apple-cursor;
|
||||
name = "macOS";
|
||||
size = 32;
|
||||
size = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 22;
|
||||
description = "Size of the cursor in pixels.";
|
||||
};
|
||||
};
|
||||
fontSizes = {
|
||||
applications = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 12;
|
||||
description = "Font size for applications.";
|
||||
};
|
||||
desktop = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 12;
|
||||
description = "Font size for desktop icons.";
|
||||
};
|
||||
popups = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 12;
|
||||
description = "Font size for popups.";
|
||||
};
|
||||
terminal = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 12;
|
||||
description = "Font size for terminal.";
|
||||
};
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
terminalOpacity = lib.mkOption {
|
||||
type = lib.types.float;
|
||||
default = 0.8;
|
||||
description = "Terminal default opacity";
|
||||
};
|
||||
|
||||
monospaceFont = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "FiraCode Nerd Font Mono";
|
||||
description = "Monospace font. Needs to be installed.";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
config = {
|
||||
|
||||
stylix = {
|
||||
# Stylix is already enabled since the system is configured to use it
|
||||
enable = true;
|
||||
package = pkgs.tela-icon-theme;
|
||||
};
|
||||
image = ./../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg;
|
||||
# don't theme applications by default
|
||||
autoEnable = false;
|
||||
|
||||
|
||||
image = ./../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg;
|
||||
|
||||
|
||||
fonts = {
|
||||
|
||||
serif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Serif";
|
||||
cursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Ice";
|
||||
size = cfg.cursor.size;
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Sans";
|
||||
iconTheme = {
|
||||
enable = true;
|
||||
package = pkgs.tela-icon-theme;
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; };
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
|
||||
|
||||
polarity = lib.mkDefault "dark";
|
||||
|
||||
fonts = {
|
||||
|
||||
serif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Serif";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Sans";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.fira-code;
|
||||
name = cfg.monospaceFont;
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-color-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
|
||||
sizes = {
|
||||
applications = cfg.fontSizes.applications;
|
||||
desktop = cfg.fontSizes.desktop;
|
||||
popups = cfg.fontSizes.popups;
|
||||
terminal = cfg.fontSizes.terminal;
|
||||
};
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
opacity = {
|
||||
applications = 1.0;
|
||||
desktop = 1.0;
|
||||
popups = 0.9;
|
||||
terminal = cfg.terminalOpacity;
|
||||
};
|
||||
|
||||
sizes = {
|
||||
applications = 14;
|
||||
desktop = 14;
|
||||
popups = 12;
|
||||
terminal = 14;
|
||||
base16Scheme = {
|
||||
scheme = "onelight";
|
||||
author = "https://github.com/one-dark";
|
||||
base00 = "#fafafa";
|
||||
base01 = "#f4f4f4";
|
||||
base02 = "#e5e5e6";
|
||||
base03 = "#dfdfe0";
|
||||
base04 = "#d7d7d8";
|
||||
base05 = "#383a42";
|
||||
base06 = "#202227";
|
||||
base07 = "#090a0b";
|
||||
base08 = "#d84a3d";
|
||||
base09 = "#a626a4";
|
||||
base0A = "#c18401";
|
||||
base0B = "#50a14f";
|
||||
base0C = "#0070a8";
|
||||
base0D = "#4078f2";
|
||||
base0E = "#a626a4";
|
||||
base0F = "#986801";
|
||||
};
|
||||
|
||||
targets = {
|
||||
hyprpaper.enable = true;
|
||||
hyprlock.enable = true;
|
||||
# disabled because they overwrite too many settings
|
||||
# gnome
|
||||
# wofi
|
||||
# vscode
|
||||
# waybar
|
||||
# kitty
|
||||
|
||||
fontconfig.enable = true;
|
||||
font-packages.enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
opacity = {
|
||||
applications = 1.0;
|
||||
desktop = 1.0;
|
||||
popups = 0.9;
|
||||
terminal = 0.8;
|
||||
|
||||
# https://pltanton.dev/posts/2024/02/nix-based-dark-light-theme-switch/
|
||||
home.packages = [
|
||||
(lib.lowPrio (pkgs.writeShellApplication {
|
||||
name = "toggle-theme";
|
||||
runtimeInputs = with pkgs; [ home-manager coreutils ripgrep ];
|
||||
text =
|
||||
''
|
||||
"$(home-manager generations | head -1 | rg -o '/[^ ]*')"/specialisation/light-theme/activate
|
||||
echo "Switched to light theme"
|
||||
'';
|
||||
}))
|
||||
];
|
||||
|
||||
|
||||
specialisation.light-theme.configuration = {
|
||||
stylix = {
|
||||
polarity = "light";
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
(lib.hiPrio (pkgs.writeShellApplication {
|
||||
name = "toggle-theme";
|
||||
runtimeInputs = with pkgs; [ home-manager coreutils ripgrep ];
|
||||
text =
|
||||
''
|
||||
"$(home-manager generations | head -2 | tail -1 | rg -o '/[^ ]*')"/activate
|
||||
echo "Switched to dark theme"
|
||||
'';
|
||||
}))
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
stylix.base16Scheme = {
|
||||
scheme = "onelight";
|
||||
author = "https://github.com/one-dark";
|
||||
base00 = "#fafafa";
|
||||
base01 = "#f4f4f4";
|
||||
base02 = "#e5e5e6";
|
||||
base03 = "#dfdfe0";
|
||||
base04 = "#d7d7d8";
|
||||
base05 = "#383a42";
|
||||
base06 = "#202227";
|
||||
base07 = "#090a0b";
|
||||
base08 = "#d84a3d";
|
||||
base09 = "#a626a4";
|
||||
base0A = "#c18401";
|
||||
base0B = "#50a14f";
|
||||
base0C = "#0070a8";
|
||||
base0D = "#4078f2";
|
||||
base0E = "#a626a4";
|
||||
base0F = "#986801";
|
||||
|
||||
};
|
||||
|
||||
stylix.targets = {
|
||||
hyprpaper.enable = true;
|
||||
hyprlock.enable = true;
|
||||
wofi.enable = true;
|
||||
|
||||
# disabled because they overwrite too many settings
|
||||
# vscode.enable = true;
|
||||
# waybar.enable = true;
|
||||
# kitty.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
9
modules/home-manager/uxplay.nix
Normal file
9
modules/home-manager/uxplay.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
lib, pkgs, ...
|
||||
}:
|
||||
{
|
||||
# requires avahi or similar
|
||||
|
||||
home.packages = with pkgs; [ uxplay ];
|
||||
|
||||
}
|
||||
11
modules/home-manager/wallpaper.nix
Normal file
11
modules/home-manager/wallpaper.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
# Write an importable nix file that copies a folder from this repo into the store and creates a symlink to a predictible directory in my home file
|
||||
{
|
||||
lib, pkgs, ...
|
||||
}:
|
||||
{
|
||||
# Copy the entire wallpapers directory into the Nix store and symlink it to ~/wallpapers
|
||||
home.file."wallpapers" = {
|
||||
source = ../../wallpapers;
|
||||
target = "Pictures/wallpapers";
|
||||
};
|
||||
}
|
||||
@@ -1,44 +1,139 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
accent = "#ffffff";
|
||||
background = "#000000";
|
||||
background-alt = "#000000";
|
||||
foreground = "##ffffff";
|
||||
rounding = 5;
|
||||
font-size = 25;
|
||||
in {
|
||||
cfg = config.nix-config.style;
|
||||
|
||||
home.packages = with pkgs; [ wofi-emoji ];
|
||||
wofiPowerMenu = pkgs.writeShellScriptBin "wofi-power-menu" ''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
options=" Power Off\n Reboot\n Lock\n Suspend"
|
||||
selected=$(echo -e "$options" | wofi --dmenu --prompt "Power Menu")
|
||||
# --width 300 --height 250
|
||||
|
||||
settings = {
|
||||
allow_markup = true;
|
||||
width = 500;
|
||||
height = 400;
|
||||
show = "drun";
|
||||
prompt = "Launch...";
|
||||
normal_window = true;
|
||||
layer = "top";
|
||||
term = "foot";
|
||||
orientation = "vertical";
|
||||
halign = "fill";
|
||||
line_wrap = "off";
|
||||
dynamic_lines = false;
|
||||
allow_images = true;
|
||||
image_size = 24;
|
||||
exec_search = false;
|
||||
hide_search = false;
|
||||
parse_search = false;
|
||||
insensitive = true;
|
||||
hide_scroll = true;
|
||||
no_actions = true;
|
||||
sort_order = "default";
|
||||
gtk_dark = true;
|
||||
filter_rate = 100;
|
||||
key_expand = "Tab";
|
||||
key_exit = "Escape";
|
||||
case "$selected" in
|
||||
" Power Off") systemctl poweroff ;;
|
||||
" Reboot") systemctl reboot ;;
|
||||
" Lock") hyprlock ;;
|
||||
" Suspend") systemctl suspend ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
'';
|
||||
|
||||
wofiFilePicker = pkgs.writeShellScriptBin "wofi-file-picker" ''
|
||||
#!/usr/bin/env bash
|
||||
initial=$(find $HOME -maxdepth 2 -type f)
|
||||
selected=$(printf "%s\n" $initial | wofi --dmenu --prompt "Select a file")
|
||||
|
||||
if [ -n "$selected" ]; then
|
||||
xdg-open "$selected"
|
||||
else
|
||||
echo "No file selected"
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
options.nix-config = {
|
||||
powerMenu = lib.mkOption {
|
||||
description = "Package to use as a power menu";
|
||||
type = lib.types.package;
|
||||
default = wofiPowerMenu;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
# global layout
|
||||
width = "50%";
|
||||
height = "50%";
|
||||
orientation = "vertical";
|
||||
hide_scroll = true;
|
||||
line_wrap = "off";
|
||||
dynamic_lines = true;
|
||||
|
||||
# search behaviour
|
||||
matching = "fuzzy";
|
||||
single_click = true;
|
||||
|
||||
|
||||
show = "drun";
|
||||
prompt = "Launch...";
|
||||
# normal_window = true;
|
||||
layer = "top";
|
||||
term = "foot";
|
||||
halign = "fill";
|
||||
|
||||
# Rich rendering
|
||||
allow_markup = true;
|
||||
allow_images = true;
|
||||
image_size = 24;
|
||||
|
||||
|
||||
exec_search = false;
|
||||
hide_search = false;
|
||||
parse_search = false;
|
||||
insensitive = true;
|
||||
no_actions = true;
|
||||
|
||||
|
||||
filter_rate = 100;
|
||||
key_expand = "Tab";
|
||||
key_exit = "Escape";
|
||||
|
||||
};
|
||||
|
||||
|
||||
style = ''
|
||||
* {
|
||||
font-family: ${cfg.monospaceFont};
|
||||
font-size: ${builtins.toString (cfg.fontSizes.desktop + 8)}px;
|
||||
color: white;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#window {
|
||||
background: rgba(1, 1, 1, 0.5);
|
||||
margin: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#input {
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
#img {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
#entry {
|
||||
padding: 10px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
background-color: #2e3440;
|
||||
outline: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#text {
|
||||
margin: 2px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
wofiPowerMenu
|
||||
wofi-emoji
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,23 +1,32 @@
|
||||
{inputs, pkgs, ...}:
|
||||
{inputs, pkgs, ...}:
|
||||
{
|
||||
xdg.enable = true;
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = [ pkgs.hyprland ];
|
||||
xdgOpenUsePortal = true;
|
||||
|
||||
# configPackages = [ pkgs.hyprland ];
|
||||
config = {
|
||||
common.default = ["gtk"];
|
||||
hyprland.default = ["gtk" "hyprland"];
|
||||
};
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-wlr
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "Desktop";
|
||||
documents = "Documents";
|
||||
# downloads = "Downloads";
|
||||
pictures = "Pictures";
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/*" = [ "code" ];
|
||||
"application/x-yaml" = [ "code" ];
|
||||
|
||||
"application/pdf" = [ "papers" ];
|
||||
"image/*" = [ "loupe" ];
|
||||
"video/*" = [ "showtime" ];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
7
modules/nixos/agenix.nix
Normal file
7
modules/nixos/agenix.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ config, pkgs, lib, inputs, ... }:
|
||||
{
|
||||
# agenix client
|
||||
environment.systemPackages = [
|
||||
inputs.agenix.packages."${system}".default
|
||||
];
|
||||
}
|
||||
88
modules/nixos/backup.nix
Normal file
88
modules/nixos/backup.nix
Normal file
@@ -0,0 +1,88 @@
|
||||
{pkgs, lib, ...}:
|
||||
let
|
||||
snapshotsDir = "/snapshots/home";
|
||||
in
|
||||
{
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
restic
|
||||
btrbk
|
||||
libnotify
|
||||
];
|
||||
|
||||
|
||||
# btrbk systemd service and timer for daily home snapshots
|
||||
systemd.services.btrbk-home-snapshot = {
|
||||
description = "Create daily btrbk snapshot of the home subvolume";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "remy";
|
||||
ExecStartPre = "${lib.getExe pkgs.libnotify} \"Backup\" \"Creating BTRBK snapshot of /home.\"";
|
||||
# run the btrbk command as superuser
|
||||
ExecStart = "+${lib.getExe pkgs.btrbk} -c /etc/btrbk/home.conf run";
|
||||
Environment = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus"; # ensure the notification is sent to the correct display
|
||||
ExecStartPost = "${lib.getExe pkgs.libnotify} \"Backup\" \"Snapshot of /home created successfully.\"";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.timers.btrbk-home-snapshot = {
|
||||
enable = true;
|
||||
description = "Daily timer for btrbk home snapshot";
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "*-*-* 12:00";
|
||||
Persistent = true; # ensures missed runs are triggered after resume
|
||||
};
|
||||
};
|
||||
# ensure the target directory exists
|
||||
systemd.tmpfiles.settings = {
|
||||
"btrbk snapshots" = {
|
||||
"${snapshotsDir}" = {
|
||||
d = {
|
||||
group = "root";
|
||||
user = "root";
|
||||
mode = "0770";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# btrbk config for home snapshots
|
||||
environment.etc."btrbk/home.conf".text = ''
|
||||
timestamp_format long
|
||||
# keep snapshots for 2 days independently of the call
|
||||
snapshot_preserve_min 2d
|
||||
# retain daily snapshots for 14 days
|
||||
snapshot_preserve 14d
|
||||
|
||||
subvolume /home
|
||||
snapshot_dir ${snapshotsDir}
|
||||
'';
|
||||
|
||||
# Now create a restic backup off the newest btrbk snapshot
|
||||
systemd.services.restic-backup-latest-snapshot = {
|
||||
description = "Backup home subvolume using restic";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${lib.getExe pkgs.restic} -r /home/snapshots/restic-backup backup /home/snapshots/home-$(date +%Y-%m-%d_%H-%M-%S)";
|
||||
# send a notification when the service is done
|
||||
ExecStartPost = "su remy -c 'notify-send \"Restic Backup\" \"Home backup created successfully.\"'";
|
||||
};
|
||||
};
|
||||
# # the udev rule:
|
||||
# services.udev.extraRules = ''
|
||||
# ACTION=="add", SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="backup-restic", TAG+="systemd", ENV{SYSTEMD_WANTS}="backup-restic.service"
|
||||
# '';
|
||||
|
||||
# # the systemd service:
|
||||
# systemd.services.backup-restic = {
|
||||
# description = "Backup using restic (triggered when USB drive is plugged in)";
|
||||
# after = [ "local-fs.target" ];
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# # TODO: adapt command
|
||||
# ExecStart = "${lib.getExe pkgs.restic} backup /home/username";
|
||||
# };
|
||||
# };
|
||||
}
|
||||
@@ -1,18 +1,31 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.bluez
|
||||
# bluez-qt
|
||||
# gnome.gnome-control-center
|
||||
pkgs.gnome-bluetooth
|
||||
];
|
||||
|
||||
services.dbus.packages = with pkgs; [
|
||||
gnome-bluetooth
|
||||
bluez
|
||||
];
|
||||
|
||||
|
||||
users.users.remy.extraGroups = [
|
||||
"networkmanager"
|
||||
|
||||
];
|
||||
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = false;
|
||||
settings = {
|
||||
General = {
|
||||
Name = "Hello";
|
||||
ControllerMode = "dual";
|
||||
FastConnectable = "true";
|
||||
Experimental = "true";
|
||||
};
|
||||
Policy = {
|
||||
AutoEnable = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
}
|
||||
|
||||
31
modules/nixos/gnome.nix
Normal file
31
modules/nixos/gnome.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.nix-config.gnome.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable GNOME desktop environment.";
|
||||
};
|
||||
config = lib.mkIf config.nix-config.gnome.enable {
|
||||
services = {
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
|
||||
gnome = {
|
||||
core-apps.enable = false;
|
||||
core-developer-tools.enable = false;
|
||||
games.enable = false;
|
||||
};
|
||||
|
||||
# Exclude some packages to keep the installation lean
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome-tour
|
||||
gnome-user-docs
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -4,22 +4,45 @@
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.nix-config;
|
||||
in
|
||||
{
|
||||
# Use hyprland as the main desktop environment but use gdm as desktop manager
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = false;
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
# Use hyprland as the main desktop environment but use gdm as desktop manager
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
|
||||
services.displayManager = {
|
||||
defaultSession = "hyprland";
|
||||
};
|
||||
services.displayManager = {
|
||||
defaultSession = "hyprland";
|
||||
};
|
||||
|
||||
services.displayManager.gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
};
|
||||
|
||||
services.gvfs.enable = true;
|
||||
|
||||
|
||||
security.pam.services.hyprlock = {};
|
||||
|
||||
security.pam.services.gdm.enableGnomeKeyring = true;
|
||||
|
||||
# Enable RTKit for real-time audio processing, ...
|
||||
# improving audio performance and reducing dropouts.
|
||||
security.rtkit.enable = true;
|
||||
# Enable D-Bus for inter-process communication
|
||||
services.dbus.enable = true;
|
||||
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
services.xserver.displayManager.gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
};
|
||||
security.pam.services.hyprlock = {};
|
||||
|
||||
}
|
||||
|
||||
11
modules/nixos/language.nix
Normal file
11
modules/nixos/language.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
# i18n.supportedLocales = [ "en_US.UTF-8" "de_DE.UTF-8" ];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
}
|
||||
4
modules/nixos/ld.nix
Normal file
4
modules/nixos/ld.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{config, ...}:
|
||||
{
|
||||
programs.nix-ld.enable = true;
|
||||
}
|
||||
@@ -1,7 +1,94 @@
|
||||
{lib, ...}:{
|
||||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager.wifi.powersave = lib.mkDefault true;
|
||||
users.users.remy.extraGroups = [
|
||||
"networkmanager"
|
||||
];
|
||||
}
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.nix-config.networking;
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
nix-config.networking.hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nixos";
|
||||
};
|
||||
|
||||
nix-config.networking.vpn = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
networking.hostName = cfg.hostName;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager.wifi.powersave = lib.mkDefault true;
|
||||
users.users.${config.nix-config.userName}.extraGroups = [
|
||||
"networkmanager"
|
||||
];
|
||||
services.avahi.enable = true;
|
||||
services.avahi.openFirewall = true;
|
||||
|
||||
# networking.firewall = {
|
||||
# enable = false;
|
||||
# };
|
||||
|
||||
# # VPN setup
|
||||
networking.networkmanager.ensureProfiles = {
|
||||
environmentFiles = [ config.sops.secrets.vpnEnvironment.path ];
|
||||
profiles.wg-home = {
|
||||
connection = {
|
||||
id = "wg-home";
|
||||
type = "wireguard";
|
||||
interface-name = "wgh";
|
||||
autoconnect = false;
|
||||
};
|
||||
|
||||
ipv4 = {
|
||||
address = "10.0.0.2/32";
|
||||
method = "manual";
|
||||
};
|
||||
|
||||
wireguard = {
|
||||
listen-port = 51820;
|
||||
private-key = "$HOME_PRIVATE_KEY";
|
||||
};
|
||||
|
||||
"wireguard-peer.y/TBD/c0GkrRtekDkCb8TUnYYil8bSRPIjPDY650pz8=" = {
|
||||
endpoint = "$HOME_ENDPOINT";
|
||||
allowed-ips = "192.168.1.0/16";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
profiles.wg-fritzbox = {
|
||||
connection = {
|
||||
id = "wg-fritzbox";
|
||||
type = "wireguard";
|
||||
interface-name = "wgfb";
|
||||
autoconnect = false;
|
||||
};
|
||||
|
||||
ipv4 = {
|
||||
address = "192.168.178.201/24";
|
||||
dns = "192.168.178.1";
|
||||
method = "manual";
|
||||
};
|
||||
|
||||
wireguard = {
|
||||
listen-port = 51820;
|
||||
private-key = "$FRITZBOX_PRIVATE_KEY";
|
||||
};
|
||||
|
||||
"wireguard-peer.Jf/seKAL7kWm2qX9gf5Ln8FiN7OlPQB3CyRovDIOEHw=" = {
|
||||
endpoint = "$FRITZBOX_ENDPOINT";
|
||||
allowed-ips = "192.168.178.0/24;fd73:ea00:5841::/64";
|
||||
preshared-key = "$FRITZBOX_PRESHARED_KEY";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
10
modules/nixos/nh.nix
Normal file
10
modules/nixos/nh.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -16,8 +16,9 @@
|
||||
hardware.graphics.enable = lib.mkForce true;
|
||||
hardware.nvidia = lib.mkForce {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
# features not available for the old graphics card
|
||||
open = false;
|
||||
nvidiaSettings = false;
|
||||
|
||||
@@ -27,7 +28,13 @@
|
||||
intelBusId = "PCI:0:2:0";
|
||||
};
|
||||
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||
version = "575.51.02";
|
||||
sha256_64bit = "sha256-XZ0N8ISmoAC8p28DrGHk/YN1rJsInJ2dZNL8O+Tuaa0=";
|
||||
openSha256 = "sha256-NQg+QDm9Gt+5bapbUO96UFsPnz1hG1dtEwT/g/vKHkw=";
|
||||
settingsSha256 = "sha256-6n9mVkEL39wJj5FB1HBml7TTJhNAhS/j5hqpNGFQE4w=";
|
||||
usePersistenced = false;
|
||||
};
|
||||
};
|
||||
# overwrite the blacklists set previously
|
||||
boot.extraModprobeConfig = lib.mkForce "";
|
||||
@@ -44,7 +51,7 @@
|
||||
blacklist nouveau
|
||||
options nouveau modeset=0
|
||||
'';
|
||||
|
||||
|
||||
services.udev.extraRules = ''
|
||||
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
@@ -61,7 +68,3 @@
|
||||
|
||||
boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ];
|
||||
}
|
||||
|
||||
|
||||
# Warning: used to have
|
||||
# lib.mkdDefault
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
}:
|
||||
{
|
||||
# Needs to be explicitly set to false...
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pulseaudio.enable = false;
|
||||
# OR
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
|
||||
dockerCompat = false;
|
||||
dockerCompat = false;
|
||||
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
# Required for containers under podman-compose to be able to talk to each other.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Useful other development tools
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-compose # start group of containers for dev
|
||||
];
|
||||
# Useful other development tools
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-compose # start group of containers for dev
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,30 +1,99 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
|
||||
CPU_MIN_PERF_ON_AC = 0;
|
||||
CPU_MAX_PERF_ON_AC = 100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 50;
|
||||
options.nix-config = {
|
||||
power = {
|
||||
batteryThresholds = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.int;
|
||||
default = [ 60 80 ];
|
||||
description = "Battery charge thresholds for power management.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
AllowSuspend=yes
|
||||
AllowHibernation=yes
|
||||
AllowHybridSleep=yes
|
||||
AllowSuspendThenHibernate=yes
|
||||
'';
|
||||
imports = [
|
||||
inputs.watt.nixosModules.default
|
||||
];
|
||||
|
||||
|
||||
config = {
|
||||
# environment.systemPackages = [
|
||||
# pkgs.power-profiles-daemon
|
||||
# ];
|
||||
services.power-profiles-daemon.enable = true;
|
||||
|
||||
# services.tlp = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# # # processor chooses frequencies itself but respects the limits set by the user
|
||||
# # CPU_DRIVER_OPMODE_ON_AC = "guided";
|
||||
# # CPU_DRIVER_OPMODE_ON_BAT = "guided";
|
||||
|
||||
# # # governor dictates global behavior of the CPU
|
||||
# # CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
# # CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
|
||||
# # # energy performance policy (EPP) sets the energy/performance balance
|
||||
# # CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
# # CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
|
||||
|
||||
# # # clock speeds reported by `sudo tlp-stat`
|
||||
# # # 623377 [kHz] and 5090910 [kHz]
|
||||
# # CPU_SCALING_MIN_FREQ_ON_AC = 623377;
|
||||
# # CPU_SCALING_MAX_FREQ_ON_AC = 5090910;
|
||||
# # CPU_SCALING_MIN_FREQ_ON_BAT = 0;
|
||||
# # # reduce max frequency on battery to save power
|
||||
# # CPU_SCALING_MAX_FREQ_ON_BAT = 3000000;
|
||||
|
||||
# # # Allow the CPU to boost
|
||||
# # CPU_BOOST_ON_AC = 1;
|
||||
# # CPU_BOOST_ON_BAT = 1;
|
||||
|
||||
|
||||
# # RADEON_DPM_PERF_LEVEL_ON_AC = "high";
|
||||
# # # WIFI_PWR_ON_BAT = "off";
|
||||
|
||||
# # enable battery charge thresholds on the default battery
|
||||
# STOP_CHARGE_THRESH_BAT0 = 1;
|
||||
# };
|
||||
# };
|
||||
|
||||
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
AllowSuspend=yes
|
||||
AllowHibernation=yes
|
||||
AllowHybridSleep=yes
|
||||
AllowSuspendThenHibernate=yes
|
||||
'';
|
||||
|
||||
# services.watt = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# battery_charge_thresholds = [
|
||||
# 40
|
||||
# 80
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
|
||||
services.upower.enable = true;
|
||||
|
||||
|
||||
services.irqbalance = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.thermald = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
12
modules/nixos/sops.nix
Normal file
12
modules/nixos/sops.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops.defaultSopsFile = ./../../secrets/vpn.env;
|
||||
sops.secrets.vpnEnvironment = {
|
||||
sopsFile = ./../../secrets/vpn.env;
|
||||
format = "dotenv";
|
||||
};
|
||||
}
|
||||
@@ -5,7 +5,29 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
stylix.enable = true;
|
||||
stylix.image = ./../../wallpapers/magicpattern-87PP9Zd7MNo-unsplash.jpg;
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
polarity = "dark";
|
||||
homeManagerIntegration.followSystem = false;
|
||||
base16Scheme = {
|
||||
# scheme = "onedark";
|
||||
# author = "https://github.com/one-dark";
|
||||
base00 = "#282c34";
|
||||
base01 = "#353b45";
|
||||
base02 = "#3e4451";
|
||||
base03 = "#545862";
|
||||
base04 = "#565c64";
|
||||
base05 = "#abb2bf";
|
||||
base06 = "#b6bdca";
|
||||
base07 = "#c8ccd4";
|
||||
base08 = "#e06c75";
|
||||
base09 = "#d19a66";
|
||||
base0A = "#e6c07b";
|
||||
base0B = "#98c379";
|
||||
base0C = "#56b6c2";
|
||||
base0D = "#61afef";
|
||||
base0E = "#c678dd";
|
||||
base0F = "#be5046";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
28
modules/nixos/user.nix
Normal file
28
modules/nixos/user.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.nix-config;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
nix-config.userName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "remy";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
users.users.${cfg.userName} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" # Enable ‘sudo’ for the user.
|
||||
"input"
|
||||
# other groups are added as needed, eg. networkmanager
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
1
secrets
Submodule
1
secrets
Submodule
Submodule secrets added at a51d89c420
@@ -1,11 +0,0 @@
|
||||
let
|
||||
|
||||
remy-nix = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMU7pWZfs7GfFTvqljA99pJV9DGJIPH+eK6DvGqBs4pG";
|
||||
remy-arch = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOP0PZqY8/YfV0NnVbFs2fZLj+nXXVJ8bDo03TyYDfW1";
|
||||
|
||||
users = [remy-arch remy-nix];
|
||||
|
||||
in {
|
||||
"secret1.age".publicKeys = users;
|
||||
"wifi.age".publicKeys = users;
|
||||
}
|
||||
BIN
secrets/wifi.age
BIN
secrets/wifi.age
Binary file not shown.
@@ -1,25 +1,5 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib.hm.gvariant;
|
||||
{
|
||||
imports = [
|
||||
../modules/home-manager/browser.nix
|
||||
../modules/home-manager/code.nix
|
||||
../modules/home-manager/dev.nix
|
||||
../modules/home-manager/documents.nix
|
||||
../modules/home-manager/fish.nix
|
||||
../modules/home-manager/flatpaks.nix
|
||||
../modules/home-manager/hypr
|
||||
../modules/home-manager/keepassxc.nix
|
||||
../modules/home-manager/kitty.nix
|
||||
../modules/home-manager/kubectl.nix
|
||||
../modules/home-manager/obsidian.nix
|
||||
../modules/home-manager/owncloud-client.nix
|
||||
../modules/home-manager/stylix.nix
|
||||
../modules/home-manager/thunderbird.nix
|
||||
../modules/home-manager/wofi.nix
|
||||
../modules/home-manager/xdg-portals.nix
|
||||
];
|
||||
|
||||
## Home Manager configuration
|
||||
home.stateVersion = "24.05";
|
||||
# Let Home Manager install and manage itself.
|
||||
@@ -32,7 +12,36 @@ with lib.hm.gvariant;
|
||||
## Utils relevant to this user only
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Remy Moll";
|
||||
userEmail = "me@moll.re";
|
||||
settings = {
|
||||
user.name = "Remy Moll";
|
||||
user.email = "me@moll.re";
|
||||
};
|
||||
};
|
||||
|
||||
## XDG configuration
|
||||
xdg = {
|
||||
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
# TODO
|
||||
"inode/directory" = "org.gnome.Nautilus.desktop";
|
||||
"application/zip" = "org.gnome.FileRoller.desktop";
|
||||
"application/octet-stream" = "org.gnome.GHex.desktop";
|
||||
# pdfs
|
||||
"application/pdf" = "org.gnome.Evince.desktop";
|
||||
# links
|
||||
"x-scheme-handler/https" = "firefox.desktop"; # Links
|
||||
"x-scheme-handler/http" = "firefox.desktop"; # Links
|
||||
# images
|
||||
# "image/png" = "org.gnome.Evince.desktop";
|
||||
# "image/jpeg" = "org.gnome.Evince.desktop";
|
||||
# "image/gif" = "org.gnome.Evince.desktop";
|
||||
# "image/svg+xml" = "org.gnome.Evince.desktop";
|
||||
# "image/tiff" = "org.gnome.Evince.desktop";
|
||||
# text-based
|
||||
"text/*" = "vscode.desktop";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
38
users/remy_spectre/default.nix
Normal file
38
users/remy_spectre/default.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib.hm.gvariant;
|
||||
{
|
||||
config = {
|
||||
nix-config = {
|
||||
hypr = {
|
||||
internal-screen = {
|
||||
resolution = "3840x2160";
|
||||
scale = "1.666667";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
imports = [
|
||||
../remy.nix
|
||||
../../modules/home-manager/browser.nix
|
||||
../../modules/home-manager/code.nix
|
||||
../../modules/home-manager/dev.nix
|
||||
../../modules/home-manager/documents.nix
|
||||
../../modules/home-manager/fish.nix
|
||||
../../modules/home-manager/flatpaks.nix
|
||||
../../modules/home-manager/hypr
|
||||
../../modules/home-manager/keepassxc.nix
|
||||
../../modules/home-manager/kitty.nix
|
||||
../../modules/home-manager/kubectl.nix
|
||||
../../modules/home-manager/obsidian.nix
|
||||
../../modules/home-manager/owncloud-client.nix
|
||||
../../modules/home-manager/ssh.nix
|
||||
../../modules/home-manager/stylix.nix
|
||||
../../modules/home-manager/thunderbird.nix
|
||||
../../modules/home-manager/wofi.nix
|
||||
../../modules/home-manager/xdg-portals.nix
|
||||
];
|
||||
|
||||
}
|
||||
37
users/remy_usb/default.nix
Normal file
37
users/remy_usb/default.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
with lib.hm.gvariant;
|
||||
{
|
||||
config = {
|
||||
nix-config = {
|
||||
hypr = {
|
||||
internal-screen = {
|
||||
resolution = "auto";
|
||||
scale = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
imports = [
|
||||
../remy.nix
|
||||
../../modules/home-manager/browser.nix
|
||||
../../modules/home-manager/code.nix
|
||||
../../modules/home-manager/dev.nix
|
||||
../../modules/home-manager/documents.nix
|
||||
../../modules/home-manager/fish.nix
|
||||
../../modules/home-manager/flatpaks.nix
|
||||
../../modules/home-manager/hypr
|
||||
../../modules/home-manager/keepassxc.nix
|
||||
../../modules/home-manager/kitty.nix
|
||||
../../modules/home-manager/kubectl.nix
|
||||
../../modules/home-manager/obsidian.nix
|
||||
../../modules/home-manager/owncloud-client.nix
|
||||
../../modules/home-manager/ssh.nix
|
||||
../../modules/home-manager/stylix.nix
|
||||
../../modules/home-manager/thunderbird.nix
|
||||
../../modules/home-manager/wofi.nix
|
||||
../../modules/home-manager/xdg-portals.nix
|
||||
];
|
||||
|
||||
}
|
||||
43
users/remy_yoga/default.nix
Normal file
43
users/remy_yoga/default.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ config, nixpkgs, lib, ... }:
|
||||
with lib.hm.gvariant;
|
||||
{
|
||||
config = {
|
||||
nix-config = {
|
||||
hypr = {
|
||||
internal-screen = {
|
||||
resolution = "2944x1840@90.00";
|
||||
scale = "1.6";
|
||||
};
|
||||
};
|
||||
# quickshell = {
|
||||
# enable = true;
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
imports = [
|
||||
../remy.nix
|
||||
../../modules/home-manager/browser.nix
|
||||
../../modules/home-manager/code.nix
|
||||
../../modules/home-manager/dev.nix
|
||||
../../modules/home-manager/directories.nix
|
||||
../../modules/home-manager/documents.nix
|
||||
../../modules/home-manager/fish.nix
|
||||
../../modules/home-manager/flatpaks.nix
|
||||
../../modules/home-manager/hypr
|
||||
../../modules/home-manager/keepassxc.nix
|
||||
../../modules/home-manager/kitty.nix
|
||||
../../modules/home-manager/kubectl.nix
|
||||
../../modules/home-manager/launcher.nix
|
||||
../../modules/home-manager/obsidian.nix
|
||||
../../modules/home-manager/owncloud-client.nix
|
||||
../../modules/home-manager/quickshell
|
||||
../../modules/home-manager/ssh.nix
|
||||
../../modules/home-manager/stylix.nix
|
||||
../../modules/home-manager/thunderbird.nix
|
||||
../../modules/home-manager/uxplay.nix
|
||||
../../modules/home-manager/wallpaper.nix
|
||||
../../modules/home-manager/xdg-portals.nix
|
||||
];
|
||||
}
|
||||
4
utils/unfree.nix
Normal file
4
utils/unfree.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
25
variable.nix
25
variable.nix
@@ -1,25 +0,0 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
config.var = {
|
||||
hostname = "garnix";
|
||||
username = "remy";
|
||||
configDirectory = "/home/" + config.var.username
|
||||
+ "/.config/nixos"; # The path of the nixos configuration directory
|
||||
|
||||
keyboardLayout = "de";
|
||||
|
||||
location = "Berlin";
|
||||
timeZone = "Europe/Berlin";
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocale = "de_DE.UTF-8";
|
||||
|
||||
git = {
|
||||
username = "Hadi";
|
||||
email = "112569860+anotherhadi@users.noreply.github.com";
|
||||
};
|
||||
|
||||
autoUpgrade = false;
|
||||
autoGarbageCollector = true;
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user