Compare commits
135 Commits
bb8c3b725b
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 52569da057 | |||
| b7ff106a25 | |||
| ecd325b830 | |||
| 52e7d921d6 | |||
| 567f8ca405 | |||
| 4f5a315521 | |||
| a6496a874d | |||
| 7fea267494 | |||
| d668ea2616 | |||
| 0fc551c8c5 | |||
| f17f1de522 | |||
| c78505aa09 | |||
| 3cd724436b | |||
| c183a0a551 | |||
| c0a1f5495f | |||
| 5996a33269 | |||
| 51045c91d6 | |||
| 0a2fb9609c | |||
| b121b0e556 | |||
| 48ed783db5 | |||
| dd4a2adcfd | |||
| 6c6af12ef6 | |||
| fd2e474229 | |||
| 70cc2587aa | |||
| 80c6d1bfe2 | |||
| a9a6518dee | |||
| 1cafcc70b5 | |||
| e4225a8156 | |||
| 2b9c7d57ba | |||
| fc3f547192 | |||
| a9beac4f61 | |||
| aa461a8344 | |||
| 7592ee3f2f | |||
| 7ac853ab56 | |||
| 142c8309fd | |||
| 25a8b04f18 | |||
| 48f9a7ad02 | |||
| 5199d55c29 | |||
| a915a3a779 | |||
| 5dfff01c9f | |||
| dd30c16492 | |||
| a20313d46a | |||
| c345431928 | |||
| 789c83686f | |||
| 293d5a7f6e | |||
| ca3c259fd4 | |||
| 8e4526a986 | |||
| 4248dd25af | |||
| 5b358a7bc1 | |||
| 75e661a2c7 | |||
| 35313911ab | |||
| 6a600e45ac | |||
| 9db98508fb | |||
| 437e3d2abe | |||
| ff16108fb9 | |||
| e29e0fefd6 | |||
| cedac03816 | |||
| a010c256c7 | |||
| f2f8b25d7e | |||
| 08396bb479 | |||
| 5af08eb27f | |||
| a94f2615ef | |||
| a754632a59 | |||
| eba2ffcdcd | |||
| f32badf55d | |||
| d016b8fdde | |||
| 562839d47d | |||
| 1197820789 | |||
| 370e2e29ff | |||
| d379c6c406 | |||
| ca7c336ff9 | |||
| bba9c8494e | |||
| 799398de33 | |||
| 506dfa7006 | |||
| 783a477b62 | |||
| 2743b4f110 | |||
| 9bcb55c3c0 | |||
| 25df94858b | |||
| f3e47f9bfe | |||
| 52e77fd1d2 | |||
| 29f4ab693d | |||
| cf0d1d2503 | |||
| de0be9d20a | |||
| 3995c29b03 | |||
| 52fbee6322 | |||
| 979583914f | |||
| 00af3ac5ec | |||
| cf30b5d7be | |||
| bf46656fcd | |||
| ed8c52cb0e | |||
| afb25e6d76 | |||
| 850f6a7905 | |||
| 4ade86b47f | |||
| 0f13b27dc7 | |||
| 446e5ab59b | |||
| 1f1a29fb7c | |||
| d9a2669577 | |||
| 4ffd2d8bfb | |||
| 95d773d2b0 | |||
| 567a3790d5 | |||
| 91e2e87ed6 | |||
| d5c6104c59 | |||
| fedc9f2de4 | |||
| ede8768868 | |||
| 1e8a704d91 | |||
| 6aeb038f61 | |||
| 0569751382 | |||
| 117630b200 | |||
| aacfe471cd | |||
| 8114541671 | |||
| 4a31a114a9 | |||
| 7ce35c7655 | |||
| 235b382535 | |||
| 5f4da82057 | |||
| 0174e0f47a | |||
| aa44b4dbc8 | |||
| 5b3374f873 | |||
| 45027ad227 | |||
| 1c415881e3 | |||
| f4e2726590 | |||
| d6e70eb5db | |||
| 7e91bfb0f5 | |||
| b3ccd0de90 | |||
| fa9ab71249 | |||
| 6de1df0772 | |||
| 61dadbb51a | |||
| cf4133344f | |||
| 17e64562dd | |||
| d060ce64d5 | |||
| 6f8d77da40 | |||
| d7d800b346 | |||
| 5b58735230 | |||
| da59669d85 | |||
| 0b8898bfbc | |||
| d37183d46e |
11
.gitea/workflows/nix-check.yaml
Normal file
11
.gitea/workflows/nix-check.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
name: Verify Nix Flake
|
||||
run-name: ${{ gitea.actor }} is nix-check
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
verify_build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v30
|
||||
- run: nix flake check
|
||||
356
flake.lock
generated
356
flake.lock
generated
@@ -1,36 +1,175 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"base16": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"fromYaml": "fromYaml"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755819240,
|
||||
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-fish": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1754405784,
|
||||
"narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=",
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-helix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1760703920,
|
||||
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-vim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1732806396,
|
||||
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-vim",
|
||||
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1764724327,
|
||||
"narHash": "sha256-OkFLrD3pFR952TrjQi1+Vdj604KLcMnkpa7lkW7XskI=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "66b7c635763d8e6eb86bd766de5a1e1fbfcc1047",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719827439,
|
||||
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
|
||||
"lastModified": 1763759067,
|
||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731966426,
|
||||
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "SenchoPens",
|
||||
"repo": "fromYaml",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gnome-shell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"host": "gitlab.gnome.org",
|
||||
"lastModified": 1764524476,
|
||||
"narHash": "sha256-bTmNn3Q4tMQ0J/P0O5BfTQwqEnCiQIzOGef9/aqAZvk=",
|
||||
"owner": "GNOME",
|
||||
"repo": "gnome-shell",
|
||||
"rev": "c0e1ad9f0f703fd0519033b8f46c3267aab51a22",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"host": "gitlab.gnome.org",
|
||||
"owner": "GNOME",
|
||||
"ref": "gnome-49",
|
||||
"repo": "gnome-shell",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765170903,
|
||||
"narHash": "sha256-O8VTGey1xxiRW+Fpb+Ps9zU7ShmxUA1a7cMTcENCVNg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
|
||||
"rev": "20561be440a11ec57a89715480717baf19fe6343",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1719895800,
|
||||
"narHash": "sha256-xNbjISJTFailxass4LmdWeV4jNhAlmJPwj46a/GxE6M=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1764440730,
|
||||
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "6e253f12b1009053eff5344be5e835f604bb64cd",
|
||||
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"ref": "master",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
@@ -38,25 +177,212 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1719848872,
|
||||
"narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
|
||||
"lastModified": 1764831616,
|
||||
"narHash": "sha256-OtzF5wBvO0jgW1WW1rQU9cMGx7zuvkF7CAVJ1ypzkxA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c97c47f2bac4fa59e2cbdeba289686ae615f8ed4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1764983851,
|
||||
"narHash": "sha256-y7RPKl/jJ/KAP/VKLMghMgXTlvNIJMHKskl8/Uuar7o=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
|
||||
"rev": "d9bc5c7dceb30d8d6fafa10aeb6aa8a48c218454",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1764522689,
|
||||
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
"stylix",
|
||||
"flake-parts"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"stylix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764773531,
|
||||
"narHash": "sha256-mCBl7MD1WZ7yCG6bR9MmpPO2VydpNkWFgnslJRIT1YU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "1d9616689e98beded059ad0384b9951e967a17fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"stylix": "stylix"
|
||||
}
|
||||
},
|
||||
"stylix": {
|
||||
"inputs": {
|
||||
"base16": "base16",
|
||||
"base16-fish": "base16-fish",
|
||||
"base16-helix": "base16-helix",
|
||||
"base16-vim": "base16-vim",
|
||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||
"flake-parts": "flake-parts",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nur": "nur",
|
||||
"systems": "systems",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
"tinted-tmux": "tinted-tmux",
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1765065096,
|
||||
"narHash": "sha256-abrrONk8vzRtY6fHEkjZOyRJpKHjPlFqMBE0+/DxfAU=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "84d9d55885d463d461234f3aac07b2389a2577d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "danth",
|
||||
"ref": "release-25.11",
|
||||
"repo": "stylix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-foot": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1726913040,
|
||||
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-foot",
|
||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-foot",
|
||||
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-kitty": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1735730497,
|
||||
"narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-kitty",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1763914658,
|
||||
"narHash": "sha256-Hju0WtMf3iForxtOwXqGp3Ynipo0EYx1AqMKLPp9BJw=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"rev": "0f6be815d258e435c9b137befe5ef4ff24bea32c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1764465359,
|
||||
"narHash": "sha256-lbSVPqLEk2SqMrnpvWuKYGCaAlfWFMA6MVmcOFJjdjE=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"rev": "edf89a780e239263cc691a987721f786ddc4f6aa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-zed": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1764464512,
|
||||
"narHash": "sha256-rCD/pAhkMdCx6blsFwxIyvBJbPZZ1oL2sVFrH07lmqg=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"rev": "907dbba5fb8cf69ebfd90b00813418a412d0a29a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
36
flake.nix
36
flake.nix
@@ -2,28 +2,40 @@
|
||||
description = "Nixos config flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
stylix.url = "github:danth/stylix/release-25.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixos-hardware, ... }@inputs:
|
||||
let
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixos-hardware,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkg = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
in {
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
nixosConfigurations = {
|
||||
laptop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/laptop/configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.stylix.nixosModules.stylix
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-x13-yoga
|
||||
(import ./overlays/ollama.nix)
|
||||
];
|
||||
};
|
||||
|
||||
desktop = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/desktop/configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
|
||||
@@ -33,6 +45,7 @@
|
||||
./hosts/server/configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
nixos-hardware.nixosModules.system76
|
||||
(import ./overlays/ollama.nix)
|
||||
];
|
||||
};
|
||||
|
||||
@@ -44,7 +57,6 @@
|
||||
nixos-hardware.nixosModules.microsoft-surface-pro-intel
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
139
hosts/desktop/configuration.nix
Normal file
139
hosts/desktop/configuration.nix
Normal file
@@ -0,0 +1,139 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./hardware-configuration.nix];
|
||||
hardware.steam-hardware.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
hardware.amdgpu.opencl.enable = true;
|
||||
boot.kernelParams = [ "amdgpu.ppfeaturemask=0xfff7ffff" "amdgpu.gpu_recovery=1" ];
|
||||
services.openssh = {enable = true;};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
|
||||
|
||||
networking = {
|
||||
hostName = "desktop";
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = false;
|
||||
};
|
||||
|
||||
nix = {
|
||||
gc.automatic = true;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = false;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
wivrn = {
|
||||
enable = false;
|
||||
defaultRuntime = true;
|
||||
autoStart = true;
|
||||
};
|
||||
xserver = {
|
||||
enable = false;
|
||||
displayManager.gdm.enable = false;
|
||||
desktopManager.gnome.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
stylix = {
|
||||
enable = false;
|
||||
autoEnable = true;
|
||||
polarity = "light";
|
||||
image = ../laptop/wallpaper.png;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/precious-light-warm.yaml";
|
||||
opacity = {
|
||||
terminal = 0.85;
|
||||
popups = 0.75;
|
||||
desktop = 0.75;
|
||||
};
|
||||
cursor = {
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
size = 28;
|
||||
};
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.nerd-fonts.iosevka;
|
||||
name = "Iosevka NF";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.nerd-fonts.iosevka;
|
||||
name = "Iosevka NF";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.iosevka;
|
||||
name = "Iosevka NFM";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
#hardware = {
|
||||
# graphics.enable32Bit = true;
|
||||
#};
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
steam.enable = false;
|
||||
gamescope.enable = false;
|
||||
envision.enable = false;
|
||||
corectrl.enable = false;
|
||||
};
|
||||
|
||||
users.users.k = {
|
||||
isNormalUser = true;
|
||||
description = "k";
|
||||
extraGroups = ["networkmanager" "wheel" "docker"];
|
||||
packages = with pkgs; [zsh];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
backupFileExtension = "bk";
|
||||
users = {"k" = import ./home.nix;};
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
}
|
||||
37
hosts/desktop/hardware-configuration.nix
Normal file
37
hosts/desktop/hardware-configuration.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/nixos";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/BB87-CC45";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp8s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
47
hosts/desktop/home.nix
Normal file
47
hosts/desktop/home.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [../home/home_common.nix];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
#home = {
|
||||
# packages = with pkgs; [
|
||||
# steam
|
||||
# neovim
|
||||
# firefox
|
||||
# wivrn
|
||||
# opencomposite
|
||||
# wlx-overlay-s
|
||||
# glslang
|
||||
# gst_all_1.gstreamer
|
||||
# libdrm
|
||||
# openxr-loader
|
||||
# khronos-ocl-icd-loader
|
||||
# ];
|
||||
#};
|
||||
|
||||
# For WiVRn:
|
||||
#xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.wivrn}/share/openxr/1/openxr_wivrn.json";
|
||||
|
||||
#xdg.configFile."openvr/openvrpaths.vrpath".text = ''
|
||||
# {
|
||||
# "config" :
|
||||
# [
|
||||
# "${config.xdg.dataHome}/Steam/config"
|
||||
# ],
|
||||
# "external_drivers" : null,
|
||||
# "jsonid" : "vrpathreg",
|
||||
# "log" :
|
||||
# [
|
||||
# "${config.xdg.dataHome}/Steam/logs"
|
||||
# ],
|
||||
# "runtime" :
|
||||
# [
|
||||
# "${pkgs.opencomposite}/lib/opencomposite"
|
||||
# ],
|
||||
# "version" : 1
|
||||
# }
|
||||
#'';
|
||||
}
|
||||
27
hosts/home/gnome.nix
Normal file
27
hosts/home/gnome.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
# ...
|
||||
dconf.settings = {
|
||||
# ...
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
|
||||
# `gnome-extensions list` for a list
|
||||
enabled-extensions = [
|
||||
"Vitals@CoreCoding.com"
|
||||
"blur-my-shell@aunetx"
|
||||
"search-light@icedman.github.com"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnomeExtensions.vitals
|
||||
gnomeExtensions.blur-my-shell
|
||||
gnomeExtensions.search-light
|
||||
];
|
||||
}
|
||||
40
hosts/home/home_common.nix
Normal file
40
hosts/home/home_common.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
username = "k";
|
||||
homeDirectory = "/home/k";
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "k";
|
||||
userEmail = "markers711@gmail.com";
|
||||
};
|
||||
tmux.enable = true;
|
||||
starship.enable = true;
|
||||
zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autocd = true;
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.8.0";
|
||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
184
hosts/home/hyprland.nix
Normal file
184
hosts/home/hyprland.nix
Normal file
@@ -0,0 +1,184 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./waybar.nix ./tile.nix];
|
||||
home.packages = with pkgs; [
|
||||
#iio-hyprland
|
||||
#jq #iio-hyprland needs this
|
||||
];
|
||||
|
||||
programs = {
|
||||
hyprlock.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
hyprpaper.enable = true;
|
||||
batsignal.enable = true;
|
||||
hypridle = {
|
||||
enable = true;
|
||||
package = pkgs.hypridle;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.variables = ["--all"];
|
||||
xwayland.enable = true;
|
||||
|
||||
settings = {
|
||||
exec-once = [
|
||||
#"${pkgs.iio-hyprland}/bin/iio-hyprland"
|
||||
"${pkgs.batsignal}/bin/batsignal -n BAT0 -b"
|
||||
"${pkgs.waybar}/bin/waybar"
|
||||
"${pkgs.hyprpaper}/bin/hyprpaper"
|
||||
];
|
||||
monitor = "eDP-1,preferred,auto,1";
|
||||
general = {
|
||||
"$mainMod" = "SUPER";
|
||||
layout = "master";
|
||||
"$terminal" = "${pkgs.alacritty}/bin/alacritty";
|
||||
"$menu" = "${pkgs.wofi}/bin/wofi --show drun";
|
||||
gaps_in = 5;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 15;
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 2;
|
||||
passes = 2;
|
||||
brightness = 1;
|
||||
noise = 0.3;
|
||||
new_optimizations = true;
|
||||
};
|
||||
};
|
||||
|
||||
misc = {
|
||||
disable_autoreload = true;
|
||||
disable_hyprland_logo = true;
|
||||
always_follow_on_dnd = true;
|
||||
layers_hog_keyboard_focus = true;
|
||||
animate_manual_resizes = false;
|
||||
enable_swallow = true;
|
||||
focus_on_activate = true;
|
||||
new_window_takes_over_fullscreen = 2;
|
||||
middle_click_paste = true;
|
||||
vfr = true;
|
||||
vrr = 1;
|
||||
};
|
||||
|
||||
input = {touchpad = {natural_scroll = true;};};
|
||||
|
||||
bind = [
|
||||
# keybindings
|
||||
"$mainMod, Return, exec, $terminal"
|
||||
"$mainMod, D, exec, $menu"
|
||||
"$mainMod Shift, C, killactive,"
|
||||
"$mainMod, Space, exec, toggle_float"
|
||||
"$mainMod, Escape, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
|
||||
#emacs
|
||||
"$mainMod, E, exec, ${pkgs.emacs-pgtk}/bin/emacsclient -c"
|
||||
"$mainMod, C, exec, ${pkgs.emacs-pgtk}/bin/emacsclient -c -e\ \"(org-roam-capture)\""
|
||||
"$mainMod, B, exec, ${pkgs.emacs-pgtk}/bin/emacsclient -c -e\ \"(call-interactively #'bookmark-jump)\""
|
||||
"$mainMod, P, exec, ${pkgs.emacs-pgtk}/bin/emacsclient -c -e\ \"(project-dired)\""
|
||||
"$mainMod, M, exec, ${pkgs.emacs-pgtk}/bin/emacsclient -c -e \"(mingus)\""
|
||||
|
||||
# switch focus
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# switch workspace
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# same as above, but switch to the workspace
|
||||
"$mainMod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mainMod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mainMod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mainMod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mainMod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mainMod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mainMod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mainMod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mainMod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mainMod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
"$mainMod CTRL, c, movetoworkspace, empty"
|
||||
|
||||
# window control
|
||||
"$mainMod SHIFT, left, movewindow, l"
|
||||
"$mainMod SHIFT, right, movewindow, r"
|
||||
"$mainMod SHIFT, up, movewindow, u"
|
||||
"$mainMod SHIFT, down, movewindow, d"
|
||||
"$mainMod CTRL, left, resizeactive, -80 0"
|
||||
"$mainMod CTRL, right, resizeactive, 80 0"
|
||||
"$mainMod CTRL, up, resizeactive, 0 -80"
|
||||
"$mainMod CTRL, down, resizeactive, 0 80"
|
||||
"$mainMod ALT, left, moveactive, -80 0"
|
||||
"$mainMod ALT, right, moveactive, 80 0"
|
||||
"$mainMod ALT, up, moveactive, 0 -80"
|
||||
"$mainMod ALT, down, moveactive, 0 80"
|
||||
|
||||
# media and volume controls
|
||||
# ",XF86AudioMute,exec, pamixer -t"
|
||||
",XF86AudioPlay,exec, playerctl play-pause"
|
||||
",XF86AudioNext,exec, playerctl next"
|
||||
",XF86AudioPrev,exec, playerctl previous"
|
||||
",XF86AudioStop,exec, playerctl stop"
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
MOZ_USE_XINPUT2 = "1";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
_JAVA_AWT_WM_NONREPARENTING = 1;
|
||||
};
|
||||
}
|
||||
36
hosts/home/sway.nix
Normal file
36
hosts/home/sway.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./waybar.nix ./tile.nix];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
floating.border = 0;
|
||||
window.border = 1;
|
||||
window.titlebar = false;
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
menu = "${pkgs.wofi}/bin/wofi --show drun";
|
||||
bars = [];
|
||||
gaps = {
|
||||
inner = 10;
|
||||
outer = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
MOZ_USE_XINPUT2 = "1";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
_JAVA_AWT_WM_NONREPARENTING = 1;
|
||||
};
|
||||
services = {swayidle = {enable = true;};};
|
||||
}
|
||||
28
hosts/home/tile.nix
Normal file
28
hosts/home/tile.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
mako = {
|
||||
enable = true;
|
||||
defaultTimeout = 4000;
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
alacritty = {enable = true;};
|
||||
wofi = {enable = true;};
|
||||
zathura = {enable = true;};
|
||||
mpv = {enable = true;};
|
||||
lf = {enable = true;};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
brightnessctl
|
||||
pulsemixer
|
||||
unzip
|
||||
zip
|
||||
swayimg
|
||||
];
|
||||
stylix.targets.wofi.enable = true; #this dosnt follow auto enable for some reson
|
||||
}
|
||||
84
hosts/home/waybar.nix
Normal file
84
hosts/home/waybar.nix
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "bottom";
|
||||
position = "bottom";
|
||||
output = ["eDP-1"];
|
||||
margin-left = 45;
|
||||
margin-right = 45;
|
||||
spacing = 15;
|
||||
|
||||
modules-left = ["sway/workspaces" "sway/mode" "hyprland/window"];
|
||||
modules-center = ["clock"];
|
||||
modules-right = ["pulseaudio" "network" "battery"];
|
||||
|
||||
cpu = {
|
||||
interval = 15;
|
||||
format = " {}%";
|
||||
max-length = 15;
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 30;
|
||||
format = " {}%";
|
||||
max-length = 15;
|
||||
};
|
||||
|
||||
"pulseaudio" = {
|
||||
format = "{volume}% {icon}";
|
||||
format-bluetooth = "{volume}% {icon} ";
|
||||
format-muted = " ";
|
||||
format-icons = {
|
||||
headphone = " ";
|
||||
hands-free = " ";
|
||||
headset = " ";
|
||||
phone = " ";
|
||||
portable = " ";
|
||||
car = " ";
|
||||
default = [" " " "];
|
||||
};
|
||||
#scroll-step = 1;
|
||||
#on-click = "pavucontrol";
|
||||
};
|
||||
|
||||
backlight = {
|
||||
tooltip = false;
|
||||
format = " {}%";
|
||||
interval = 1;
|
||||
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
|
||||
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl s 5%+";
|
||||
};
|
||||
|
||||
network = {
|
||||
format = "{ifname}";
|
||||
format-wifi = "{essid} ({signalStrength}%) ";
|
||||
format-ethernet = "{ipaddr}/{cidr} ";
|
||||
format-disconnected = " ";
|
||||
tooltip-format = "{ifname} via {gwaddr} ";
|
||||
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
|
||||
tooltip-format-ethernet = "{ifname} ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
max-length = 50;
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{capacity}% {icon}";
|
||||
"format-icons" = [" " " " " " " " " "];
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%I:%M %p}";
|
||||
"format-alt" = "{:%a, %d. %b %H:%M}";
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,33 +1,46 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./hardware-configuration.nix ];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
system.autoUpgrade.enable = true;
|
||||
time.timeZone = "America/New_York";
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
nix = {
|
||||
gc.automatic = false;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
#substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"];
|
||||
#trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "laptop";
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = true;
|
||||
};
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
@@ -38,74 +51,158 @@
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
hardware.sensor.iio.enable = true;
|
||||
networking.hostName = "laptop"; # Define your hostname.
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.fprintd.enable = true;
|
||||
services.tlp.enable = true;
|
||||
services.thermald.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
powerManagement.enable = true;
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
services = {
|
||||
hardware.bolt = {enable = true;};
|
||||
displayManager.ly = {
|
||||
enable = true;
|
||||
x11Support = false;
|
||||
settings = {
|
||||
animation = "colormix";
|
||||
battery_id = "BAT0";
|
||||
clear_password = true;
|
||||
colormix_col1 = "0xA7C080";
|
||||
colormix_col2 = "0x7FBBB3";
|
||||
colormix_col3 = "0xE67E80";
|
||||
};
|
||||
};
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
auto-cpufreq = {
|
||||
enable = false;
|
||||
settings = {
|
||||
battery = {
|
||||
governor = "powersave";
|
||||
turbo = "never";
|
||||
};
|
||||
charger = {
|
||||
governor = "balance_performance";
|
||||
turbo = "auto";
|
||||
};
|
||||
};
|
||||
};
|
||||
logind = {
|
||||
lidSwitch = "suspend-then-hibernate";
|
||||
lidSwitchExternalPower = "suspend";
|
||||
};
|
||||
avahi = {
|
||||
enable = false;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
blueman.enable = true;
|
||||
fwupd.enable = true;
|
||||
printing.enable = true;
|
||||
fprintd.enable = true;
|
||||
thermald.enable = true;
|
||||
};
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
polarity = "dark";
|
||||
image = ./wallpaper.png;
|
||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml";
|
||||
opacity = {
|
||||
terminal = 0.85;
|
||||
popups = 0.75;
|
||||
desktop = 0.75;
|
||||
applications = 0.85;
|
||||
};
|
||||
cursor = {
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
size = 28;
|
||||
};
|
||||
fonts = {
|
||||
serif = {
|
||||
package = pkgs.nerd-fonts.iosevka;
|
||||
name = "Iosevka NF";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
package = pkgs.nerd-fonts.iosevka;
|
||||
name = "Iosevka NF";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = pkgs.nerd-fonts.iosevka;
|
||||
name = "Iosevka NFM";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
sensor.iio.enable = true;
|
||||
graphics.enable32Bit = true;
|
||||
graphics.extraPackages = with pkgs; [
|
||||
intel-vaapi-driver
|
||||
intel-media-driver
|
||||
intel-compute-runtime
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
virt-manager.enable = true;
|
||||
hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {enable = true;};
|
||||
kvmgt = {enable = true;};
|
||||
docker = {enable = true;};
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
programs.zsh.enable = true;
|
||||
users.users.k = {
|
||||
isNormalUser = true;
|
||||
description = "k";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
extraGroups = ["networkmanager" "wheel" "cdrom" "libvirtd"];
|
||||
packages = with pkgs; [zsh];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
users = {
|
||||
"k" = import ./home.nix;
|
||||
};
|
||||
backupFileExtension = "bk";
|
||||
users = {"k" = import ./home.nix;};
|
||||
};
|
||||
|
||||
system.autoUpgrade.enable = true;
|
||||
nix.gc.automatic = true;
|
||||
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
intel-vaapi-driver
|
||||
intel-compute-runtime
|
||||
intel-media-driver
|
||||
microcodeIntel
|
||||
environment = {
|
||||
sessionVariables = {MOZ_USE_XINPUT2 = "1";};
|
||||
systemPackages = with pkgs; [
|
||||
config.boot.kernelPackages.perf
|
||||
];
|
||||
networking.firewall.enable = true;
|
||||
};
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=20m
|
||||
SuspendState=mem
|
||||
'';
|
||||
|
||||
boot = {
|
||||
plymouth = {enable = true;};
|
||||
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"loglevel=3"
|
||||
"rd.systemd.show_status=false"
|
||||
"rd.udev.log_level=3"
|
||||
];
|
||||
loader.timeout = 0;
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
@@ -114,5 +211,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
@@ -1,36 +1,31 @@
|
||||
# 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")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/9c2b187e-a9db-48f1-adce-dd9311675223";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/a7301069-c11f-411e-9a23-446744c3ae76";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-665ec0f0-45b9-413f-adff-e7c4d734f832".device = "/dev/disk/by-uuid/665ec0f0-45b9-413f-adff-e7c4d734f832";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/5D11-53E2";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/19F3-CD7E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/0dfad18a-8bd0-430c-99c4-135daa6fb892"; }
|
||||
];
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/d9df94a1-5088-468c-839d-f4cd10cb7e5f";}];
|
||||
|
||||
# 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
|
||||
@@ -40,11 +35,10 @@
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.initrd.luks.devices."luks-4d1ff260-d134-4b6c-80ef-5f5b74c87988".device = "/dev/disk/by-uuid/4d1ff260-d134-4b6c-80ef-5f5b74c87988";
|
||||
|
||||
}
|
||||
|
||||
@@ -1,53 +1,71 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
home.enableNixpkgsReleaseCheck = false;
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../home/home_common.nix
|
||||
../home/hyprland.nix
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home.username = "k";
|
||||
home.homeDirectory = "/home/k";
|
||||
home.stateVersion = "23.11";
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
chromium #this might replace firefox
|
||||
keepassxc
|
||||
thunderbird
|
||||
blender
|
||||
vesktop
|
||||
spotify
|
||||
alacritty
|
||||
|
||||
home.packages = [
|
||||
pkgs.neovim
|
||||
pkgs.firefox
|
||||
pkgs.keepassxc
|
||||
pkgs.syncthing
|
||||
pkgs.thunderbird
|
||||
pkgs.blender
|
||||
pkgs.discord
|
||||
pkgs.btop
|
||||
pkgs.zip
|
||||
pkgs.spotify
|
||||
pkgs.distrobox
|
||||
];
|
||||
btop
|
||||
zip
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "k";
|
||||
userEmail = "markers711@gmail.com";
|
||||
};
|
||||
prismlauncher
|
||||
steam
|
||||
gamescope
|
||||
|
||||
programs.starship.enable = true;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autocd = true;
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.8.0";
|
||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||
};
|
||||
}
|
||||
direnv
|
||||
texliveFull
|
||||
ispell
|
||||
];
|
||||
};
|
||||
|
||||
services.syncthing.enable = true;
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacs-pgtk.override{withTreeSitter=true; withNativeCompilation=true;};
|
||||
extraPackages = epkgs: [
|
||||
epkgs.vterm
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
syncthing.enable = true;
|
||||
|
||||
mpd = {
|
||||
enable = true;
|
||||
musicDirectory = "/home/k/Music";
|
||||
};
|
||||
|
||||
emacs = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
};
|
||||
stylix = {
|
||||
enable = true;
|
||||
autoEnable = true;
|
||||
};
|
||||
}
|
||||
|
||||
BIN
hosts/laptop/wallpaper.png
Normal file
BIN
hosts/laptop/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
@@ -1,99 +1,75 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./service.nix
|
||||
];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [./hardware-configuration.nix ./service.nix];
|
||||
powerManagement.enable = true;
|
||||
system.autoUpgrade.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
nix = {
|
||||
gc.automatic = true;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
#substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"];
|
||||
#trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = false;
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
neovim.enable = true;
|
||||
};
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = false;
|
||||
services.xserver.desktopManager.gnome.enable = false;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.auto-cpufreq.enable = true;
|
||||
services.thermald.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = false;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
];
|
||||
programs.zsh.enable = true;
|
||||
users.users.k = {
|
||||
users = {
|
||||
motd = "Welcome to the Server";
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users = {
|
||||
k = {
|
||||
isNormalUser = true;
|
||||
description = "k";
|
||||
extraGroups = ["networkmanager" "wheel" "libvirtd"];
|
||||
packages = with pkgs; [zsh];
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPKbKVe6gneJ9ghFih3bOeL++iDNPJNIMoZSdNMOsD0I k@laptop"];
|
||||
};
|
||||
docker = {
|
||||
isNormalUser = true;
|
||||
description = "user for runing docker";
|
||||
extraGroups = ["docker"];
|
||||
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPKbKVe6gneJ9ghFih3bOeL++iDNPJNIMoZSdNMOsD0I k@laptop"];
|
||||
packages = with pkgs; [docker-compose];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
users = {
|
||||
"k" = import ./home.nix;
|
||||
};
|
||||
backupFileExtension = "bk";
|
||||
users = {"k" = import ./home.nix;};
|
||||
};
|
||||
|
||||
system.autoUpgrade.enable = true;
|
||||
nix.gc.automatic = true;
|
||||
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
intel-vaapi-driver
|
||||
intel-compute-runtime
|
||||
intel-media-driver
|
||||
microcodeIntel
|
||||
firefox
|
||||
];
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
vaapiVdpau
|
||||
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
|
||||
vpl-gpu-rt # QSV on 11th gen or newer
|
||||
intel-media-sdk # QSV up to 11th gen
|
||||
];
|
||||
networking.firewall = {
|
||||
enable = false;
|
||||
allowedTCPPorts = [80 443 22 ];
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
@@ -103,5 +79,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# 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")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
|
||||
boot.initrd.kernelModules = [];
|
||||
@@ -18,20 +20,17 @@
|
||||
|
||||
networking.hostName = "nixserver"; # Define your hostname.
|
||||
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/aaf4a4be-fed2-42b2-be79-4ca920bb7292";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/aaf4a4be-fed2-42b2-be79-4ca920bb7292";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/150F-09C6";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/150F-09C6";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/ecde85bd-abea-4926-80d5-810b01d0e364"; }
|
||||
];
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/ecde85bd-abea-4926-80d5-810b01d0e364";}];
|
||||
|
||||
# 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
|
||||
@@ -41,5 +40,6 @@
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
@@ -1,44 +1,12 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
home.enableNixpkgsReleaseCheck = false;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home.username = "k";
|
||||
home.homeDirectory = "/home/k";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
home.packages = [
|
||||
pkgs.syncthing
|
||||
pkgs.neovim
|
||||
pkgs.btop
|
||||
];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "k";
|
||||
userEmail = "markers711@gmail.com";
|
||||
};
|
||||
|
||||
programs.starship.enable = true;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autocd = true;
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-nix-shell";
|
||||
file = "nix-shell.plugin.zsh";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chisui";
|
||||
repo = "zsh-nix-shell";
|
||||
rev = "v0.8.0";
|
||||
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [../home/home_common.nix];
|
||||
home = {packages = with pkgs; [docker docker-compose neovim waypipe];};
|
||||
services = {
|
||||
syncthing.enable = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,79 +1,138 @@
|
||||
{pkgs,lib,...}:
|
||||
{
|
||||
services.openssh = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [80 443 22 25565 26615 8080 53 19132 ];
|
||||
allowedUDPPorts = [26615 8080 1900 51820 53 19132 ];
|
||||
};
|
||||
nat.externalInterface = "wlp0s20f3";
|
||||
nat.internalInterfaces = [ "wg0" ];
|
||||
wireguard.interfaces = {
|
||||
wg0 = {
|
||||
ips = ["10.0.0.1/24"];
|
||||
listenPort = 51820;
|
||||
privateKeyFile = "/keys/wg-private";
|
||||
peers = [
|
||||
{ # laptop
|
||||
publicKey = "Ze2y3K+blI3aBc1AKTlvv90j+McBaitB+qSLazsuSFM=";
|
||||
allowedIPs = ["10.0.0.2/32"];
|
||||
}
|
||||
|
||||
{ # phone
|
||||
publicKey = "vcheBoHRxCrwzbMw0UI9ZsQfVDJizBWkeM+pF5/8+HE=";
|
||||
allowedIPs = ["10.0.0.3/32"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
networking.nat.enable = true;
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "markers711@gmail.com";
|
||||
};
|
||||
|
||||
services.gitea = {
|
||||
virtualisation = {
|
||||
docker = {enable = true;};
|
||||
libvirtd = {enable = true;};
|
||||
kvmgt = {enable = true;};
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh = {enable = true;};
|
||||
|
||||
jellyfin = {enable = true;};
|
||||
|
||||
fail2ban = {enable = true;};
|
||||
|
||||
postgresql = {enable = true;};
|
||||
|
||||
i2p = {enable = true;};
|
||||
|
||||
nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = "/var/cache-priv-key.pem";
|
||||
};
|
||||
|
||||
ollama = {
|
||||
enable = false;
|
||||
package = pkgs.ollama-intel;
|
||||
};
|
||||
|
||||
gitea = {
|
||||
enable = true;
|
||||
settings = {
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
service.ENABLE_PUSH_CREATE_USER = true;
|
||||
server = {
|
||||
HTTP_PORT = 8001;
|
||||
DOMAIN = "dhilton.xyz";
|
||||
ROOT_URL = "https://git.dhilton.xyz";
|
||||
ENABLE_PUSH_CREATE_USER = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.gitea-actions-runner.instances.home = {
|
||||
gitea-actions-runner.instances.home = {
|
||||
enable = true;
|
||||
url = "https://git.dhilton.xyz";
|
||||
name = "nixsrv";
|
||||
token = "LaqTWUDidsm510TGBglGvcphsUxYmCzMjrZbEtJj";
|
||||
labels = ["ubuntu-latest:docker://node:16-bullseye" "ubuntu-22.04:docker://node:16-bullseye" "ubuntu-20.04:docker://node:16-bullseye" "ubuntu-18.04:docker://node:16-buster" "native:host"];
|
||||
labels = [
|
||||
"ubuntu-latest:docker://catthehacker/ubuntu:act-latest"
|
||||
"ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04"
|
||||
"ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04"
|
||||
"ubuntu-18.04:docker://catthehacker/ubuntu:act-18.04"
|
||||
"native:host"
|
||||
];
|
||||
};
|
||||
|
||||
services.pufferpanel = {
|
||||
enable = true;
|
||||
extraGroups =["docker"];
|
||||
extraPackages = [pkgs.jre];
|
||||
environment = {
|
||||
PUFFER_WEB_HOST = ":8002";
|
||||
PUFFER_PANEL_REGISTRATIONENABLED = "false";
|
||||
};
|
||||
};
|
||||
|
||||
services.home-assistant = {
|
||||
enable = true;
|
||||
extraComponents = ["wiz" "fail2ban" "whisper" "piper" "wyoming" "ollama"];
|
||||
home-assistant = {
|
||||
enable = false;
|
||||
extraComponents = ["wiz" "fail2ban" "ollama" "wyoming" "androidtv" "androidtv_remote"];
|
||||
config = {
|
||||
default_config = {};
|
||||
"automation ui" = "!include automations.yaml";
|
||||
http = {
|
||||
use_x_forwarded_for = "true";
|
||||
trusted_proxies = ["127.0.0.1"];
|
||||
server_port=8003;
|
||||
server_port = 8002;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wyoming = {
|
||||
piper.servers."piperNix" = {
|
||||
enable = false;
|
||||
uri = "tcp://0.0.0.0:10200";
|
||||
voice = "en-us-ryan-low";
|
||||
};
|
||||
faster-whisper.servers."whisperNix" = {
|
||||
enable = false;
|
||||
uri = "tcp://0.0.0.0:10300";
|
||||
language = "en";
|
||||
};
|
||||
};
|
||||
|
||||
services.ntfy-sh = {
|
||||
searx = {
|
||||
enable = true;
|
||||
settings = {
|
||||
listen-http = ":8004";
|
||||
auth-file = "/var/lib/ntfy.db";
|
||||
auth-default-access = "read-only";
|
||||
base-url = "https://ntfy.dhilton.xyz";
|
||||
server.port = 8003;
|
||||
server.secret_key = "secretlol";
|
||||
search.formats = ["html" "json"];
|
||||
};
|
||||
};
|
||||
|
||||
services.searx = {
|
||||
akkoma = {
|
||||
enable = true;
|
||||
settings = { server.port = 8005; server.secret_key = "secretlol";};
|
||||
};
|
||||
|
||||
networking.domain = "dhilton.xyz";
|
||||
|
||||
services.postgresql.enable = true;
|
||||
|
||||
services.akkoma.enable = true;
|
||||
services.akkoma.config = {
|
||||
initDb.enable = true;
|
||||
config = {
|
||||
":pleroma" = {
|
||||
":instance" = {
|
||||
name = "dhilton fedi";
|
||||
@@ -81,34 +140,21 @@
|
||||
email = "markers711@gmail.com";
|
||||
registration_open = false;
|
||||
};
|
||||
|
||||
"Pleroma.Web.Endpoint" = {
|
||||
url.host = "fed.dhilton.xyz";
|
||||
"Pleroma.Web.Endpoint" = {url.host = "fed.dhilton.xyz";};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.akkoma.nginx = {
|
||||
nginx = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
};
|
||||
|
||||
services.fail2ban = {
|
||||
enable=false;
|
||||
};
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
nginx = {
|
||||
enable = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedTlsSettings = true;
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts = {
|
||||
|
||||
virtualHosts = {
|
||||
"dhilton.xyz" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
@@ -116,25 +162,16 @@
|
||||
};
|
||||
|
||||
"git.dhilton.xyz" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8001";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
"ntfy.dhilton.xyz" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8004";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
"jel.dhilton.xyz" = {
|
||||
addSSL = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8096";
|
||||
@@ -142,8 +179,8 @@
|
||||
};
|
||||
};
|
||||
|
||||
"puf.dhilton.xyz" = {
|
||||
addSSL = true;
|
||||
"hom.dhilton.xyz" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8002";
|
||||
@@ -152,16 +189,16 @@
|
||||
};
|
||||
|
||||
"srx.dhilton.xyz" = {
|
||||
addSSL = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8005";
|
||||
proxyPass = "http://127.0.0.1:8003";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
"map.dhilton.xyz" = {
|
||||
addSSL = true;
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8100";
|
||||
@@ -169,35 +206,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
"hom.dhilton.xyz" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8003";
|
||||
proxyWebsockets = true;
|
||||
"nix.dhilton.xyz" = {
|
||||
locations."/".proxyPass = "http://127.0.0.1:5000";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "markers711@gmail.com";
|
||||
};
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [(pkgs.OVMF.override {
|
||||
secureBoot = true;
|
||||
tpmSupport = true;
|
||||
}).fd];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, inputs, nixos-hardware, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
nixos-hardware,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
@@ -33,7 +35,6 @@
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
#services.xserver.enable = true;
|
||||
|
||||
@@ -47,13 +48,9 @@
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.auto-cpufreq.enable = true;
|
||||
services.thermald.enable = true;
|
||||
powerManagement.powertop.enable = true;
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
@@ -76,16 +73,11 @@
|
||||
packages = with pkgs; [zsh];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
home-manager = {
|
||||
users = {
|
||||
"k" = import ./home.nix;
|
||||
};
|
||||
};
|
||||
home-manager = {users = {"k" = import ./home.nix;};};
|
||||
|
||||
system.autoUpgrade.enable = true;
|
||||
nix.gc.automatic = true;
|
||||
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
@@ -108,5 +100,4 @@
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# 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")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
@@ -20,21 +22,17 @@
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/479b497e-7807-48e4-82e6-d6468549a281";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/479b497e-7807-48e4-82e6-d6468549a281";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/DACA-E1BC";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/DACA-E1BC";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/19941c01-ac8c-4609-a834-20259f3ee32e"; }
|
||||
];
|
||||
swapDevices = [{device = "/dev/disk/by-uuid/19941c01-ac8c-4609-a834-20259f3ee32e";}];
|
||||
|
||||
# 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
|
||||
@@ -44,5 +42,6 @@
|
||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
home.enableNixpkgsReleaseCheck = false;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
49
overlays/ollama.nix
Normal file
49
overlays/ollama.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
ollama-intel = prev.ollama.overrideAttrs (oldAttrs: {
|
||||
buildInputs =
|
||||
oldAttrs.buildInputs
|
||||
or []
|
||||
++ [prev.intel-compute-runtime.drivers];
|
||||
propagatedBuildInputs =
|
||||
oldAttrs.propagetedBuildInputs
|
||||
or []
|
||||
++ [prev.intel-compute-runtime.drivers];
|
||||
|
||||
cmakeFlags = [
|
||||
"GGML_NATIVE=true"
|
||||
"BUILD_SHARED_LIBS=true"
|
||||
"GGML_BLAS=true"
|
||||
"GGML_SYCL=true"
|
||||
"GGML_SYCL_F16=false"
|
||||
"CMAKE_C_COMPILER=icx"
|
||||
"CMAKE_CXX_COMPILER=icpx"
|
||||
];
|
||||
|
||||
postInstall =
|
||||
(oldAttrs.postInstall or "")
|
||||
+ ''
|
||||
mkdir -p "$out/bin"
|
||||
cat << EOF > "$out/bin/ollama-wrapped"
|
||||
#!/bin/sh
|
||||
export LD_LIBRARY_PATH="${prev.intel-compute-runtime.drivers}/lib"
|
||||
export OLLAMA_INTEL_GPU=1
|
||||
export OLLAMA_NUM_GPU=999
|
||||
export ZES_ENABLE_SYSMAN=1
|
||||
export SYCL_CACHE_PERSISTENT=1
|
||||
exec "$out/bin/ollama-base" "\$@"
|
||||
EOF
|
||||
chmod +x "$out/bin/ollama-wrapped"
|
||||
mv $out/bin/ollama $out/bin/ollama-base
|
||||
ln -s "$out/bin/ollama-wrapped" "$out/bin/ollama"
|
||||
'';
|
||||
});
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user