Compare commits
75 commits
6c4377f7e1
...
4ebb3aaed1
Author | SHA1 | Date | |
---|---|---|---|
4ebb3aaed1 | |||
5766455c95 | |||
de7a2753df | |||
1a0c925449 | |||
02b0b569ea | |||
adfe3ce6cd | |||
d08eb3a107 | |||
2aa8ea0180 | |||
a4a651133b | |||
350f85904b | |||
ab869efa90 | |||
bbae058bcb | |||
0a8a480845 | |||
2aa2199cad | |||
d464f0f053 | |||
64f6f336ea | |||
a1aa8f0b25 | |||
9ed4324c52 | |||
3903008b44 | |||
86d8732081 | |||
851a9cecac | |||
1519fb0acb | |||
84c3e1ef32 | |||
eba430685f | |||
1c605c6665 | |||
19e9b330dd | |||
3049f81aab | |||
9cd4e0d972 | |||
4ac5527aca | |||
fb97c4e0d5 | |||
9c105efe71 | |||
da1008f661 | |||
a7be324484 | |||
e8fca43d0c | |||
f0aabeee50 | |||
be0e89431a | |||
f4780259a7 | |||
b994549a1c | |||
4e8b840830 | |||
e493646556 | |||
c2c0471097 | |||
65be421f53 | |||
bf45f5ebe3 | |||
468bd046ee | |||
73f00bcc14 | |||
31c5516a9f | |||
064530792a | |||
6444f1842e | |||
9f21445d76 | |||
80e84d19ac | |||
624ed44bba | |||
34cbb44cc1 | |||
361ecd917e | |||
3ef6e6e381 | |||
ed8665fa49 | |||
4fa1f87caa | |||
242fc839cd | |||
6c93b657c5 | |||
0367ebecae | |||
00cbba8b0a | |||
de6d981cf0 | |||
63a9058e30 | |||
65ce70cda9 | |||
8e722cfe5a | |||
819cd005c7 | |||
5a52a2734d | |||
21e26daea3 | |||
1829515dd3 | |||
db5ca96ada | |||
98040c5e71 | |||
6636261dbc | |||
1d210c4cad | |||
9d3bbbe01a | |||
03b8fb2d5d | |||
3bc86778ff |
44 changed files with 1244 additions and 2188 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
result
|
||||
*.swp
|
||||
*.qcow2
|
||||
*.qcow2
|
||||
.idea/
|
55
README.md
55
README.md
|
@ -10,31 +10,6 @@ nixos-rebuild switch --flake flake_path_directory#hostname
|
|||
nix flake update --extra-experimental-features "nix-command flakes"
|
||||
```
|
||||
|
||||
## Configure VM
|
||||
|
||||
Configure VM
|
||||
```nix
|
||||
users.users.<user>.initialPassword = "<password>";
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
virtualisation = {
|
||||
memorySize = <RAM in MiB>; # Use 8192MiB memory.
|
||||
cores = <CPU Core number>;
|
||||
# And more here https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/virtualisation/qemu-vm.nix
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Build
|
||||
```bash
|
||||
nixos-rebuild build-vm --flake .#nixos-test
|
||||
```
|
||||
|
||||
Run
|
||||
```bash
|
||||
./result/bin/run-nixos-vm-vm
|
||||
```
|
||||
|
||||
## Show changements between revisions
|
||||
|
||||
|
||||
|
@ -72,36 +47,6 @@ error: cached failure of attribute 'nixosConfigurations.perso-desktop.config.sys
|
|||
sudo rm -fr /root/.cache/nix/
|
||||
```
|
||||
|
||||
## If package is marked as insecure
|
||||
|
||||
Example:
|
||||
|
||||
> error: Package 'nix-2.16.2' in /nix/store/nra828scc8qs92b9pxra5csqzffb6hpl-source/pkgs/tools/package-management/nix/default.nix:229 is marked as insecure, refusing to evaluate.
|
||||
>
|
||||
> Known issues:
|
||||
> - CVE-2024-27297
|
||||
|
||||
```bash
|
||||
nix path-info -r /run/current-system | grep nix-2.16.2
|
||||
```
|
||||
Result:
|
||||
> [...]
|
||||
>
|
||||
> /nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2
|
||||
>
|
||||
> [...]
|
||||
|
||||
```bash
|
||||
nix-store -q --referrers /nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2
|
||||
```
|
||||
Result:
|
||||
> /nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2
|
||||
>
|
||||
> /nix/store/72pfc05339izcwqhlbs8441brrdasas7-nix-2.16.2-dev
|
||||
>
|
||||
> /nix/store/ln2z5d5izn8icm3wx94ci13ad19lzjhr-nixd-1.2.3
|
||||
|
||||
nixd is not up to date and require nix 2.16.2
|
||||
|
||||
## To limit resources use during build
|
||||
|
||||
|
|
489
flake.lock
generated
489
flake.lock
generated
|
@ -12,11 +12,11 @@
|
|||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716561646,
|
||||
"narHash": "sha256-UIGtLO89RxKt7RF2iEgPikSdU53r6v/6WYB0RW3k89I=",
|
||||
"lastModified": 1723293904,
|
||||
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "c2fc0762bbe8feb06a2e59a364fa81b3a57671c9",
|
||||
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -47,6 +47,203 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"doom-emacs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1662497747,
|
||||
"narHash": "sha256-4n7E1fqda7cn5/F2jTkOnKw1juG6XMS/FI9gqODL3aU=",
|
||||
"owner": "doomemacs",
|
||||
"repo": "doomemacs",
|
||||
"rev": "3853dff5e11655e858d0bfae64b70cb12ef685ac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "doomemacs",
|
||||
"repo": "doomemacs",
|
||||
"rev": "3853dff5e11655e858d0bfae64b70cb12ef685ac",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"doom-snippets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1694887483,
|
||||
"narHash": "sha256-KlKhruPSLPSKqUnr5/U65arm16VrY9ORzm+XKNZhpTQ=",
|
||||
"owner": "doomemacs",
|
||||
"repo": "snippets",
|
||||
"rev": "f022984ee1318a4015d5d081b3c3dab5a60dc6ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "doomemacs",
|
||||
"repo": "snippets",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"emacs-overlay": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1676366521,
|
||||
"narHash": "sha256-i4UAY8t9Au9SJtsgYppa3NHSVf1YkV6yqnNIQd+Km4g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "c16be6de78ea878aedd0292aa5d4a1ee0a5da501",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "c16be6de78ea878aedd0292aa5d4a1ee0a5da501",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"emacs-so-long": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1575031854,
|
||||
"narHash": "sha256-xIa5zO0ZaToDrec1OFjBK6l39AbA4l/CE4LInVu2hi0=",
|
||||
"owner": "hlissner",
|
||||
"repo": "emacs-so-long",
|
||||
"rev": "ed666b0716f60e8988c455804de24b55919e71ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hlissner",
|
||||
"repo": "emacs-so-long",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"evil-escape": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1588439096,
|
||||
"narHash": "sha256-aB2Ge5o/93B18tPf4fN1c+O46CNh/nOqwLJbox4c8Gw=",
|
||||
"owner": "hlissner",
|
||||
"repo": "evil-escape",
|
||||
"rev": "819f1ee1cf3f69a1ae920e6004f2c0baeebbe077",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hlissner",
|
||||
"repo": "evil-escape",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"evil-markdown": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1626852210,
|
||||
"narHash": "sha256-HBBuZ1VWIn6kwK5CtGIvHM1+9eiNiKPH0GUsyvpUVN8=",
|
||||
"owner": "Somelauw",
|
||||
"repo": "evil-markdown",
|
||||
"rev": "8e6cc68af83914b2fa9fd3a3b8472573dbcef477",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Somelauw",
|
||||
"repo": "evil-markdown",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"evil-org-mode": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1607203864,
|
||||
"narHash": "sha256-JxwqVYDN6OIJEH15MVI6XOZAPtUWUhJQWHyzcrUvrFg=",
|
||||
"owner": "hlissner",
|
||||
"repo": "evil-org-mode",
|
||||
"rev": "a9706da260c45b98601bcd72b1d2c0a24a017700",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hlissner",
|
||||
"repo": "evil-org-mode",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"evil-quick-diff": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1575189609,
|
||||
"narHash": "sha256-oGzl1ayW9rIuq0haoiFS7RZsS8NFMdEA7K1BSozgnJU=",
|
||||
"owner": "rgrinberg",
|
||||
"repo": "evil-quick-diff",
|
||||
"rev": "69c883720b30a892c63bc89f49d4f0e8b8028908",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rgrinberg",
|
||||
"repo": "evil-quick-diff",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"explain-pause-mode": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1595842060,
|
||||
"narHash": "sha256-++znrjiDSx+cy4okFBBXUBkRFdtnE2x+trkmqjB3Njs=",
|
||||
"owner": "lastquestion",
|
||||
"repo": "explain-pause-mode",
|
||||
"rev": "2356c8c3639cbeeb9751744dbe737267849b4b51",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lastquestion",
|
||||
"repo": "explain-pause-mode",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"format-all": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1581716637,
|
||||
"narHash": "sha256-ul7LCe60W8TIvUmUtZtZRo8489TK9iTPDsLHmzxY57M=",
|
||||
"owner": "lassik",
|
||||
"repo": "emacs-format-all-the-code",
|
||||
"rev": "47d862d40a088ca089c92cd393c6dca4628f87d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lassik",
|
||||
"repo": "emacs-format-all-the-code",
|
||||
"rev": "47d862d40a088ca089c92cd393c6dca4628f87d3",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -54,11 +251,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716736760,
|
||||
"narHash": "sha256-h3RmnNknKYtVA+EvUSra6QAwfZjC2q1G8YA7W0gat8Y=",
|
||||
"lastModified": 1726036828,
|
||||
"narHash": "sha256-ZQHbpyti0jcAKnwQY1lwmooecLmSG6wX1JakQ/eZNeM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "5d151429e1e79107acf6d06dcc5ace4e642ec239",
|
||||
"rev": "8a1671642826633586d12ac3158e463c7a50a112",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -67,6 +264,52 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-doom-emacs": {
|
||||
"inputs": {
|
||||
"doom-emacs": "doom-emacs",
|
||||
"doom-snippets": "doom-snippets",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"emacs-so-long": "emacs-so-long",
|
||||
"evil-escape": "evil-escape",
|
||||
"evil-markdown": "evil-markdown",
|
||||
"evil-org-mode": "evil-org-mode",
|
||||
"evil-quick-diff": "evil-quick-diff",
|
||||
"explain-pause-mode": "explain-pause-mode",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"format-all": "format-all",
|
||||
"nix-straight": [
|
||||
"nix-straight"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nose": "nose",
|
||||
"ob-racket": "ob-racket",
|
||||
"org": "org",
|
||||
"org-contrib": "org-contrib",
|
||||
"org-yt": "org-yt",
|
||||
"php-extras": "php-extras",
|
||||
"revealjs": "revealjs",
|
||||
"rotate-text": "rotate-text",
|
||||
"sln-mode": "sln-mode",
|
||||
"ts-fold": "ts-fold",
|
||||
"ws-butler": "ws-butler"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701264882,
|
||||
"narHash": "sha256-MBXR7x7Ua8qystlGr+lenwjQd7dsFNFpEFmtHhh10zM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-doom-emacs",
|
||||
"rev": "f7413022370f24bb53cb450bfb2803233510113e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-doom-emacs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-flatpak": {
|
||||
"locked": {
|
||||
"lastModified": 1711997201,
|
||||
|
@ -83,13 +326,30 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-straight": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696948727,
|
||||
"narHash": "sha256-6fQamWVIyeLoFSJl1WKcIl+LUdZluzFla4H+4Z5Cv2E=",
|
||||
"owner": "codingkoi",
|
||||
"repo": "nix-straight.el",
|
||||
"rev": "c64edbf49598453bd85dae1acef9a0f9d294185d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "codingkoi",
|
||||
"ref": "codingkoi/apply-librephoenixs-fix",
|
||||
"repo": "nix-straight.el",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1716509168,
|
||||
"narHash": "sha256-4zSIhSRRIoEBwjbPm3YiGtbd8HDWzFxJjw5DYSDy1n8=",
|
||||
"lastModified": 1725983898,
|
||||
"narHash": "sha256-4b3A9zPpxAxLnkF9MawJNHDtOOl6ruL0r6Og1TEDGCE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bfb7a882678e518398ce9a31a881538679f6f092",
|
||||
"rev": "1355a0cbfeac61d785b7183c0caaec1f97361b43",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -99,12 +359,174 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nose": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1400604510,
|
||||
"narHash": "sha256-daEi8Kta1oGaDEmUUDDQMahTTPOpvNpDKk22rlr7cB0=",
|
||||
"owner": "emacsattic",
|
||||
"repo": "nose",
|
||||
"rev": "f8528297519eba911696c4e68fa88892de9a7b72",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "emacsattic",
|
||||
"repo": "nose",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1726059953,
|
||||
"narHash": "sha256-uuqSnIgC2g3W6wk6Of1HvOFgFvo5Q+h0469VwMzDaBI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "72296d37a29541a017e545c8f4e2c5c37dbaba59",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ob-racket": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1584656173,
|
||||
"narHash": "sha256-rBUYDDCXb+3D4xTPQo9UocbTPZ32kWV1Uya/1DmZknU=",
|
||||
"owner": "xchrishawk",
|
||||
"repo": "ob-racket",
|
||||
"rev": "83457ec9e1e96a29fd2086ed19432b9d75787673",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "xchrishawk",
|
||||
"repo": "ob-racket",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"org": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1695726851,
|
||||
"narHash": "sha256-qgbjspklSoI8M3cbCJOcUdjuijRgsL/+PSyEOW9VX4I=",
|
||||
"owner": "emacs-straight",
|
||||
"repo": "org-mode",
|
||||
"rev": "aa9177e1a8b039c357d369c1c9aaab710bb247a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "emacs-straight",
|
||||
"repo": "org-mode",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"org-contrib": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1694946041,
|
||||
"narHash": "sha256-X/HFG6NZe5BY00KvGbcsIuf9R6Lg8x7Uhd0Y5+Q3qZU=",
|
||||
"owner": "emacsmirror",
|
||||
"repo": "org-contrib",
|
||||
"rev": "5eabbf22bdd4523c922a30787e98ee66c24221aa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "emacsmirror",
|
||||
"repo": "org-contrib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"org-yt": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1527381913,
|
||||
"narHash": "sha256-dzQ6B7ryzatHCTLyEnRSbWO0VUiX/FHYnpHTs74aVUs=",
|
||||
"owner": "TobiasZawada",
|
||||
"repo": "org-yt",
|
||||
"rev": "40cc1ac76d741055cbefa13860d9f070a7ade001",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "TobiasZawada",
|
||||
"repo": "org-yt",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"php-extras": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1573312690,
|
||||
"narHash": "sha256-r4WyVbzvT0ra4Z6JywNBOw5RxOEYd6Qe2IpebHXkj1U=",
|
||||
"owner": "arnested",
|
||||
"repo": "php-extras",
|
||||
"rev": "d410c5af663c30c01d461ac476d1cbfbacb49367",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "arnested",
|
||||
"repo": "php-extras",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"revealjs": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1695738029,
|
||||
"narHash": "sha256-Z9c9Q41jMkj/DyXOiZYyIa7Gmn8VB8yauTyWrSsT+ps=",
|
||||
"owner": "hakimel",
|
||||
"repo": "reveal.js",
|
||||
"rev": "88fbfc5751ad01e3f6adee5819eabeb9e73c3757",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hakimel",
|
||||
"repo": "reveal.js",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"home-manager": "home-manager",
|
||||
"nix-doom-emacs": "nix-doom-emacs",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nix-straight": "nix-straight",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nur": "nur"
|
||||
}
|
||||
},
|
||||
"rotate-text": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1322962747,
|
||||
"narHash": "sha256-SOeOgSlcEIsKhUiYDJv0p+mLUb420s9E2BmvZQvZ0wk=",
|
||||
"owner": "debug-ito",
|
||||
"repo": "rotate-text.el",
|
||||
"rev": "48f193697db996855aee1ad2bc99b38c6646fe76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "debug-ito",
|
||||
"repo": "rotate-text.el",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"sln-mode": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1423727528,
|
||||
"narHash": "sha256-XqkqPyEJuTtFslOz1fpTf/Klbd/zA7IGpzpmum/MGao=",
|
||||
"owner": "sensorflo",
|
||||
"repo": "sln-mode",
|
||||
"rev": "0f91d1b957c7d2a7bab9278ec57b54d57f1dbd9c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sensorflo",
|
||||
"repo": "sln-mode",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -121,6 +543,53 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ts-fold": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1695278494,
|
||||
"narHash": "sha256-O4NcUC1u08W8ZslqoA/i+iTaLotKwheURXQWBxLLMFc=",
|
||||
"owner": "jcs-elpa",
|
||||
"repo": "ts-fold",
|
||||
"rev": "70b2c79ff4daa7351d4e2917b0343b9a18d4d4f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "jcs-elpa",
|
||||
"repo": "ts-fold",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ws-butler": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1634511126,
|
||||
"narHash": "sha256-c0y0ZPtxxICPk+eaNbbQf6t+FRCliNY54CCz9QHQ8ZI=",
|
||||
"owner": "hlissner",
|
||||
"repo": "ws-butler",
|
||||
"rev": "572a10c11b6cb88293de48acbb59a059d36f9ba5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hlissner",
|
||||
"repo": "ws-butler",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
21
flake.nix
21
flake.nix
|
@ -3,6 +3,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nur.url = github:nix-community/NUR;
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
|
@ -16,13 +17,30 @@
|
|||
};
|
||||
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
|
||||
|
||||
# Follow nix-doom-emacs completely when this is merged or fixed
|
||||
# - https://github.com/nix-community/nix-doom-emacs/issues/409
|
||||
# - https://github.com/nix-community/nix-straight.el/pull/4
|
||||
nix-straight = {
|
||||
url = "github:codingkoi/nix-straight.el?ref=codingkoi/apply-librephoenixs-fix";
|
||||
flake = false;
|
||||
};
|
||||
nix-doom-emacs = {
|
||||
url = "github:nix-community/nix-doom-emacs";
|
||||
inputs = {
|
||||
nix-straight.follows = "nix-straight";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{
|
||||
nixpkgs,
|
||||
nur,
|
||||
home-manager,
|
||||
agenix,
|
||||
nix-flatpak,
|
||||
nix-doom-emacs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
@ -41,12 +59,15 @@
|
|||
./hosts/${s.name}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
agenix.nixosModules.default
|
||||
{ nixpkgs.overlays = [ nur.overlay ]; }
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = inputs;
|
||||
home-manager.users.florian.imports = [
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
nix-doom-emacs.hmModule
|
||||
|
||||
./hosts/${s.name}/home.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
kitty.enable = true;
|
||||
};
|
||||
|
||||
editors = {
|
||||
vscode.enable = true;
|
||||
};
|
||||
|
||||
shell = {
|
||||
zsh.enable = true;
|
||||
atuin.enable = true;
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
networking.hostName = "nixos-desktop-perso"; # Define your hostname.
|
||||
|
||||
modules.system = {
|
||||
apps = {
|
||||
steam.enable = true;
|
||||
};
|
||||
|
||||
desktop = {
|
||||
plasma.enable = true;
|
||||
};
|
||||
|
@ -34,5 +38,9 @@
|
|||
printing.enable = true;
|
||||
waydroid.enable = true;
|
||||
};
|
||||
|
||||
server = {
|
||||
distrobox.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,15 +8,12 @@
|
|||
modules.home = {
|
||||
apps = {
|
||||
chromium.enable = true;
|
||||
firefox.enable = true;
|
||||
flatpak.enable = true;
|
||||
jetbrainsToolbox.enable = true;
|
||||
kitty.enable = true;
|
||||
};
|
||||
|
||||
editors = {
|
||||
vscode.enable = true;
|
||||
};
|
||||
|
||||
shell = {
|
||||
zsh.enable = true;
|
||||
atuin.enable = true;
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
kitty.enable = true;
|
||||
};
|
||||
|
||||
editors = {
|
||||
vscode.enable = true;
|
||||
};
|
||||
|
||||
shell = {
|
||||
zsh.enable = true;
|
||||
atuin.enable = true;
|
||||
|
|
|
@ -19,18 +19,18 @@
|
|||
|
||||
networking.hostName = "nixos-laptop-pro"; # Define your hostname.
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
# information bus: pci@0000:00:02.0
|
||||
intelBusId = "PCI:0:2:0";
|
||||
# information bus: pci@0000:01:00.0
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
# hardware.nvidia.prime = {
|
||||
# offload = {
|
||||
# enable = true;
|
||||
# enableOffloadCmd = true;
|
||||
# };
|
||||
#
|
||||
# # Make sure to use the correct Bus ID values for your system!
|
||||
# # information bus: pci@0000:00:02.0
|
||||
# intelBusId = "PCI:0:2:0";
|
||||
# # information bus: pci@0000:01:00.0
|
||||
# nvidiaBusId = "PCI:1:0:0";
|
||||
# };
|
||||
|
||||
modules.system = {
|
||||
desktop = {
|
||||
|
@ -47,5 +47,9 @@
|
|||
printing.enable = true;
|
||||
waydroid.enable = true;
|
||||
};
|
||||
|
||||
server = {
|
||||
distrobox.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,15 +8,12 @@
|
|||
modules.home = {
|
||||
apps = {
|
||||
chromium.enable = true;
|
||||
firefox.enable = true;
|
||||
flatpak.enable = true;
|
||||
jetbrainsToolbox.enable = true;
|
||||
kitty.enable = true;
|
||||
};
|
||||
|
||||
editors = {
|
||||
vscode.enable = true;
|
||||
};
|
||||
|
||||
shell = {
|
||||
zsh.enable = true;
|
||||
atuin.enable = true;
|
||||
|
|
5
modules/common.nix
Normal file
5
modules/common.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./chromium
|
||||
./firefox
|
||||
./flatpak
|
||||
./jetbrainsToolbox
|
||||
./kitty
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
44
modules/home/apps/firefox/default.nix
Normal file
44
modules/home/apps/firefox/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.home.apps.firefox;
|
||||
in
|
||||
{
|
||||
options.modules.home.apps.firefox = {
|
||||
enable = mkEnableOption ''
|
||||
Enable firefox with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
nativeMessagingHosts = [
|
||||
pkgs.kdePackages.plasma-browser-integration
|
||||
];
|
||||
|
||||
profiles = {
|
||||
perso = {
|
||||
id = 0;
|
||||
|
||||
name = "Perso";
|
||||
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
bitwarden
|
||||
floccus
|
||||
plasma-integration
|
||||
istilldontcareaboutcookies
|
||||
darkreader
|
||||
];
|
||||
|
||||
settings = {
|
||||
# Enable multi-pip
|
||||
"media.videocontrols.picture-in-picture.allow-multiple" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -12,7 +12,6 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
|
||||
|
@ -21,22 +20,15 @@ in
|
|||
packages = [
|
||||
# Gaming
|
||||
{ appId = "com.discordapp.Discord"; origin = "flathub"; }
|
||||
{ appId = "com.valvesoftware.Steam"; origin = "flathub"; }
|
||||
{ appId = "net.lutris.Lutris"; origin = "flathub"; }
|
||||
|
||||
# Pro
|
||||
{ appId = "com.slack.Slack"; origin = "flathub"; }
|
||||
{ appId = "com.skype.Client"; origin = "flathub"; }
|
||||
{ appId = "org.mozilla.Thunderbird"; origin = "flathub"; }
|
||||
{ appId = "ch.protonmail.protonmail-bridge"; origin = "flathub"; }
|
||||
{ appId = "org.kde.neochat"; origin = "flathub"; }
|
||||
|
||||
# Loisir
|
||||
{ appId = "com.spotify.Client"; origin = "flathub"; }
|
||||
{ appId = "io.gitlab.news_flash.NewsFlash"; origin = "flathub"; }
|
||||
{ appId = "org.videolan.VLC"; origin = "flathub"; }
|
||||
{ appId = "com.obsproject.Studio"; origin = "flathub"; }
|
||||
{ appId = "io.github.achetagames.epic_asset_manager"; origin = "flathub"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,6 +11,6 @@ in
|
|||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [jetbrains-toolbox];
|
||||
home.packages = with pkgs; [jetbrains-toolbox graalvm-ce];
|
||||
};
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
../common.nix
|
||||
./apps
|
||||
./editors
|
||||
./desktop
|
||||
|
@ -16,6 +17,5 @@
|
|||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./emacs
|
||||
./vscode
|
||||
];
|
||||
}
|
19
modules/home/editors/emacs/default.nix
Normal file
19
modules/home/editors/emacs/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.home.editors.emacs;
|
||||
in
|
||||
{
|
||||
options.modules.home.editors.emacs = {
|
||||
enable = mkEnableOption ''
|
||||
Enable emacs with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomPrivateDir = ./doom.d;
|
||||
};
|
||||
};
|
||||
}
|
76
modules/home/editors/emacs/doom.d/config.el
Normal file
76
modules/home/editors/emacs/doom.d/config.el
Normal file
|
@ -0,0 +1,76 @@
|
|||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Place your private configuration here! Remember, you do not need to run 'doom
|
||||
;; sync' after modifying this file!
|
||||
|
||||
|
||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
||||
;; clients, file templates and snippets. It is optional.
|
||||
;; (setq user-full-name "John Doe"
|
||||
;; user-mail-address "john@doe.com")
|
||||
|
||||
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
||||
;;
|
||||
;; - `doom-font' -- the primary font to use
|
||||
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
|
||||
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
||||
;; presentations or streaming.
|
||||
;; - `doom-symbol-font' -- for symbols
|
||||
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
|
||||
;;
|
||||
;; See 'C-h v doom-font' for documentation and more examples of what they
|
||||
;; accept. For example:
|
||||
;;
|
||||
;; (setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
|
||||
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
|
||||
;;
|
||||
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
|
||||
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
||||
;; refresh your font settings. If Emacs still can't find your font, it likely
|
||||
;; wasn't installed correctly. Font issues are rarely Doom issues!
|
||||
|
||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
||||
;; `load-theme' function. This is the default:
|
||||
(setq doom-theme 'doom-one)
|
||||
|
||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||
(setq display-line-numbers-type t)
|
||||
|
||||
;; If you use `org' and don't want your org files in the default location below,
|
||||
;; change `org-directory'. It must be set before org loads!
|
||||
(setq org-directory "~/org/")
|
||||
|
||||
|
||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
||||
;;
|
||||
;; (after! PACKAGE
|
||||
;; (setq x y))
|
||||
;;
|
||||
;; The exceptions to this rule:
|
||||
;;
|
||||
;; - Setting file/directory variables (like `org-directory')
|
||||
;; - Setting variables which explicitly tell you to set them before their
|
||||
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
|
||||
;; - Setting doom variables (which start with 'doom-' or '+').
|
||||
;;
|
||||
;; Here are some additional functions/macros that will help you configure Doom.
|
||||
;;
|
||||
;; - `load!' for loading external *.el files relative to this one
|
||||
;; - `use-package!' for configuring packages
|
||||
;; - `after!' for running code after a package has loaded
|
||||
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
||||
;; this file. Emacs searches the `load-path' when you load packages with
|
||||
;; `require' or `use-package'.
|
||||
;; - `map!' for binding new keys
|
||||
;;
|
||||
;; To get information about any of these functions/macros, move the cursor over
|
||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
||||
;; This will open documentation for it, including demos of how they are used.
|
||||
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
|
||||
;; etc).
|
||||
;;
|
||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||
;; they are implemented.
|
195
modules/home/editors/emacs/doom.d/init.el
Normal file
195
modules/home/editors/emacs/doom.d/init.el
Normal file
|
@ -0,0 +1,195 @@
|
|||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This file controls what Doom modules are enabled and what order they load
|
||||
;; in. Remember to run 'doom sync' after modifying it!
|
||||
|
||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||
;; documentation. There you'll find a link to Doom's Module Index where all
|
||||
;; of our modules are listed, including what flags they support.
|
||||
|
||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||
;; flags as well (those symbols that start with a plus).
|
||||
;;
|
||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
;;indent-guides ; highlighted indent columns
|
||||
ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
nav-flash ; blink cursor line after big motions
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
tabs ; a tab bar for Emacs
|
||||
(treemacs +lsp) ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
(evil +everywhere); come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
;;(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
(ibuffer +icons) ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
;;vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
;;collab ; buffers with friends
|
||||
(debugger +lsp) ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
;;docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;;ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
;;gist ; interacting with github gists
|
||||
lookup ; navigate your code and its documentation
|
||||
lsp ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
;;make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
;;pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
tree-sitter ; syntax and parsing, sitting in a tree...
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||
;;tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
(cc +lsp) ; C > C++ == 1
|
||||
;;cloju
|
||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
;;data ; config/data formats
|
||||
(dart +flutter +lsp) ; paint ui and not much else
|
||||
;;dhall
|
||||
(elixir +lsp) ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
;;ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
;;(graphql +lsp) ; Give queries a REST
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
json ; At least it ain't XML
|
||||
(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
(kotlin +lsp) ; a better, slicker Java(Script)
|
||||
;;latex ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
org ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
;;python ; beautiful is better than ugly
|
||||
(qt +lsp +xp) ; the 'cutest' gui framework ever
|
||||
;;racket ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
;;rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
(ruby +lsp +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
;;web ; the tubes
|
||||
yaml ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
;;calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
;;literate
|
||||
(default +bindings +smartparens))
|
52
modules/home/editors/emacs/doom.d/packages.el
Normal file
52
modules/home/editors/emacs/doom.d/packages.el
Normal file
|
@ -0,0 +1,52 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; $DOOMDIR/packages.el
|
||||
|
||||
;; To install a package with Doom you must declare them here and run 'doom sync'
|
||||
;; on the command line, then restart Emacs for the changes to take effect -- or
|
||||
;; use 'M-x doom/reload'.
|
||||
|
||||
|
||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||
;(package! some-package)
|
||||
|
||||
;; To install a package directly from a remote git repo, you must specify a
|
||||
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
||||
;; https://github.com/radian-software/straight.el#the-recipe-format
|
||||
;(package! another-package
|
||||
; :recipe (:host github :repo "username/repo"))
|
||||
|
||||
;; If the package you are trying to install does not contain a PACKAGENAME.el
|
||||
;; file, or is located in a subdirectory of the repo, you'll need to specify
|
||||
;; `:files' in the `:recipe':
|
||||
;(package! this-package
|
||||
; :recipe (:host github :repo "username/repo"
|
||||
; :files ("some-file.el" "src/lisp/*.el")))
|
||||
|
||||
;; If you'd like to disable a package included with Doom, you can do so here
|
||||
;; with the `:disable' property:
|
||||
;(package! builtin-package :disable t)
|
||||
|
||||
;; You can override the recipe of a built in package without having to specify
|
||||
;; all the properties for `:recipe'. These will inherit the rest of its recipe
|
||||
;; from Doom or MELPA/ELPA/Emacsmirror:
|
||||
;(package! builtin-package :recipe (:nonrecursive t))
|
||||
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
|
||||
|
||||
;; Specify a `:branch' to install a package from a particular branch or tag.
|
||||
;; This is required for some packages whose default branch isn't 'master' (which
|
||||
;; our package manager can't deal with; see radian-software/straight.el#279)
|
||||
;(package! builtin-package :recipe (:branch "develop"))
|
||||
|
||||
;; Use `:pin' to specify a particular commit to install.
|
||||
;(package! builtin-package :pin "1a2b3c4d5e")
|
||||
|
||||
|
||||
;; Doom's packages are pinned to a specific commit and updated from release to
|
||||
;; release. The `unpin!' macro allows you to unpin single packages...
|
||||
;(unpin! pinned-package)
|
||||
;; ...or multiple packages
|
||||
;(unpin! pinned-package another-pinned-package)
|
||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
||||
;(unpin! t)
|
||||
|
||||
(package! ripgrep)
|
|
@ -26,6 +26,7 @@ in
|
|||
|
||||
userTasks = {};
|
||||
|
||||
# Waiting https://github.com/nix-community/home-manager/pull/5640 to support multi-profiles support
|
||||
extensions = with pkgs; with vscode-extensions; [
|
||||
# Nix
|
||||
bbenoist.nix
|
||||
|
|
|
@ -13,10 +13,20 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
|
||||
userName = "Florian RICHER";
|
||||
userEmail = "florian.richer@protonmail.com";
|
||||
|
||||
# signing.signByDefault = true;
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = "B19E3F4A2D806AB4793FDF2FC73D37CBED7BFC77";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
url."https://invent.kde.org/".insteadOf = "kde:";
|
||||
url."ssh://git@invent.kde.org/".pushInsteadOf = "kde:";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
7
modules/system/apps/default.nix
Normal file
7
modules/system/apps/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./steam
|
||||
];
|
||||
}
|
22
modules/system/apps/steam/default.nix
Normal file
22
modules/system/apps/steam/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.apps.steam;
|
||||
in
|
||||
{
|
||||
options.modules.system.apps.steam = {
|
||||
enable = mkEnableOption ''
|
||||
Enable steam with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ gamescope ];
|
||||
extraCompatPackages = with pkgs; [ proton-ge-bin ];
|
||||
};
|
||||
|
||||
hardware.steam-hardware.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../common.nix
|
||||
];
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
|
@ -21,13 +25,39 @@
|
|||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
services.pcscd.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
nixd
|
||||
|
||||
# Usefull tools to debug
|
||||
gdb
|
||||
lldb
|
||||
gammaray # QT Inspector
|
||||
|
||||
yubikey-manager
|
||||
|
||||
# Usefull for automatic informations collect software like KDE
|
||||
vulkan-tools # For vulkaninfo command
|
||||
wayland-utils # For wayland-info command
|
||||
glxinfo
|
||||
clinfo
|
||||
aha
|
||||
usbutils
|
||||
pciutils
|
||||
];
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.florian = {
|
||||
isNormalUser = true;
|
||||
|
@ -37,6 +67,10 @@
|
|||
|
||||
services.flatpak.enable = true; # Important can't be enabled from home-manager
|
||||
|
||||
# Downloads and provides debug symbols and source code for nix derivations to gdb and other debuginfod-capable debuggers as needed.
|
||||
# Require https://github.com/symphorien/nixseparatedebuginfod?tab=readme-ov-file#gdb
|
||||
services.nixseparatedebuginfod.enable = true;
|
||||
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./apps
|
||||
./desktop
|
||||
./hardware
|
||||
./server
|
||||
|
|
|
@ -26,17 +26,6 @@ in
|
|||
environment.systemPackages = with pkgs; with kdePackages; [
|
||||
krfb # Use by kdeconnect for virtualmonitorplugin "krfb-virtualmonitor"
|
||||
discover
|
||||
|
||||
# Usefull for automatic informations collect software like KDE
|
||||
vulkan-tools # For vulkaninfo command
|
||||
wayland-utils # For wayland-info command
|
||||
glxinfo
|
||||
clinfo
|
||||
];
|
||||
|
||||
# Uncomment when kwin is available in nixpkgs and NVIDIA 555
|
||||
nixpkgs.overlays = [
|
||||
(import ../../../../overlays/kwin)
|
||||
];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,41 +11,51 @@ in
|
|||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
powerManagement.enable = false;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
nvidia-container-toolkit.enable = true;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = false;
|
||||
nvidia = {
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
# Support is limited to the Turing and later architectures. Full list of
|
||||
# supported GPUs is at:
|
||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||
# Only available from driver 515.43.04+
|
||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||
open = true;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
};
|
||||
};
|
||||
|
||||
# boot.extraModprobeConfig = ''
|
||||
# options nvidia NVreg_EnableGpuFirmware=0
|
||||
# '';
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ in
|
|||
};
|
||||
config = mkIf cfg.enable {
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
|
@ -28,4 +27,4 @@ in
|
|||
#media-session.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./distrobox
|
||||
./docker
|
||||
./ollama
|
||||
./openssh
|
||||
];
|
||||
}
|
17
modules/system/server/distrobox/default.nix
Normal file
17
modules/system/server/distrobox/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.server.distrobox;
|
||||
in
|
||||
{
|
||||
options.modules.system.server.distrobox = {
|
||||
enable = mkEnableOption ''
|
||||
Enable distrobox with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
modules.system.server.docker.enable = true;
|
||||
environment.systemPackages = with pkgs; [ distrobox ];
|
||||
};
|
||||
}
|
|
@ -13,7 +13,8 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableNvidia = config.modules.system.hardware.nvidia.enable;
|
||||
};
|
||||
|
||||
users.users.florian.extraGroups = [ "docker" ];
|
||||
};
|
||||
}
|
21
modules/system/server/ollama/default.nix
Normal file
21
modules/system/server/ollama/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.server.ollama;
|
||||
nvidiaEnabled = config.modules.system.hardware.nvidia.enable;
|
||||
in
|
||||
{
|
||||
options.modules.system.server.ollama = {
|
||||
enable = mkEnableOption ''
|
||||
Enable ollama with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
|
||||
acceleration = if nvidiaEnabled then "cuda" else null;
|
||||
};
|
||||
};
|
||||
}
|
0
overlays/.gitkeep
Normal file
0
overlays/.gitkeep
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,9 +0,0 @@
|
|||
self: super: {
|
||||
kdePackages = super.kdePackages.overrideScope (kde-self: kde-super: rec {
|
||||
kwin = kde-super.kwin.overrideAttrs (oldAttrs: rec {
|
||||
patches = oldAttrs.patches ++ [
|
||||
./5511.patch # https://invent.kde.org/plasma/kwin/-/merge_requests/5511
|
||||
];
|
||||
});
|
||||
});
|
||||
}
|
30
tips/debug_insecure_package.md
Normal file
30
tips/debug_insecure_package.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
## If package is marked as insecure
|
||||
|
||||
Example:
|
||||
|
||||
> error: Package 'nix-2.16.2' in /nix/store/nra828scc8qs92b9pxra5csqzffb6hpl-source/pkgs/tools/package-management/nix/default.nix:229 is marked as insecure, refusing to evaluate.
|
||||
>
|
||||
> Known issues:
|
||||
> - CVE-2024-27297
|
||||
|
||||
```bash
|
||||
nix path-info -r /run/current-system | grep nix-2.16.2
|
||||
```
|
||||
Result:
|
||||
> [...]
|
||||
>
|
||||
> /nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2
|
||||
>
|
||||
> [...]
|
||||
|
||||
```bash
|
||||
nix-store -q --referrers /nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2
|
||||
```
|
||||
Result:
|
||||
> /nix/store/g4ss2h40n3j37bq20x1qw5s7nl82lch5-nix-2.16.2
|
||||
>
|
||||
> /nix/store/72pfc05339izcwqhlbs8441brrdasas7-nix-2.16.2-dev
|
||||
>
|
||||
> /nix/store/ln2z5d5izn8icm3wx94ci13ad19lzjhr-nixd-1.2.3
|
||||
|
||||
nixd is not up to date and require nix 2.16.2
|
24
tips/distrobox/kde/.kde_bashrc
Normal file
24
tips/distrobox/kde/.kde_bashrc
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Required for kde-builder command
|
||||
if [[ $PATH != *".local/bin"* ]]; then
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
# Workaround for NixOS
|
||||
# ENVs have nix store references and made conflict during build or run of KDE Apps, Shells, Frameworks
|
||||
alias new_shell="env -u PATH -u QML2_IMPORT_PATH -u QT_PLUGIN_PATH -u NIXPKGS_QT6_QML_IMPORT_PATH -u XDG_CONFIG_DIRS bash -l"
|
||||
|
||||
alias build_plasma_mobile="kde-builder plasma-mobile plasma-settings plasma-desktop kactivitymanagerd"
|
||||
|
||||
function run_mobile() {
|
||||
source "$HOME/kde/build/plasma-mobile/prefix.sh"
|
||||
|
||||
QT_QPA_PLATFORM=offscreen plasma-mobile-envmanager --apply-settings
|
||||
|
||||
# Environment variables
|
||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||
export QT_QUICK_CONTROLS_MOBILE=1
|
||||
export PLASMA_PLATFORM=phone:handheld
|
||||
export QT_QUICK_CONTROLS_STYLE=org.kde.breeze
|
||||
|
||||
QT_QPA_PLATFORM=wayland dbus-run-session kwin_wayland --xwayland "plasmashell -p org.kde.plasma.mobileshell" --width 360 --height 720
|
||||
}
|
20
tips/distrobox/kde/configure.sh
Executable file
20
tips/distrobox/kde/configure.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
if ! grep -Fxq "source ~/.kde_bashrc" ~/.bashrc
|
||||
then
|
||||
cp .kde_bashrc ~/.kde_bashrc
|
||||
echo "source ~/.kde_bashrc" > ~/.bashrc
|
||||
source ~/.bashrc
|
||||
fi
|
||||
|
||||
echo "Installing kde-builder"
|
||||
curl 'https://invent.kde.org/sdk/kde-builder/-/raw/master/scripts/initial_setup.sh?ref_type=heads' > ~/initial_setup.sh
|
||||
bash ~/initial_setup.sh && rm ~/initial_setup.sh
|
||||
|
||||
echo "Run initial setup from kde-builder"
|
||||
kde-builder --initial-setup
|
||||
|
||||
echo "Install missing dependencies"
|
||||
sudo dnf install qt6-*-devel librsvg2-devel
|
||||
|
||||
echo "Configuration DONE"
|
6
tips/distrobox/kde/distrobox.ini
Normal file
6
tips/distrobox/kde/distrobox.ini
Normal file
|
@ -0,0 +1,6 @@
|
|||
[kdedev]
|
||||
image=quay.io/fedora/fedora:latest
|
||||
home="${HOME}/.distrobox_home/kdedev"
|
||||
nvidia=true
|
||||
root=false
|
||||
pull=true
|
19
tips/distrobox/kde/use_distrobox.md
Normal file
19
tips/distrobox/kde/use_distrobox.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# How to develop on KDE
|
||||
|
||||
## First configuration
|
||||
|
||||
1. `distrobox assemble`
|
||||
> You can add --replace to recreate distrobox container
|
||||
2. `distrobox enter kdedev`
|
||||
3. `bash configure.sh`
|
||||
4. `kde-builder run solid`
|
||||
> You use NixOS ? It's necessary to run `new_shell` alias before.
|
||||
> The alias unset all nixos env variables with nix store references to avoid conflicts with build or run of KDE Shells/Apps/Tools.
|
||||
|
||||
## Usefull config in ~/.config/kdesrc-buildrc
|
||||
|
||||
Autogenerate editor configuration
|
||||
|
||||
- generate-clion-project-config
|
||||
- generate-vscode-project-config
|
||||
- generate-qtcreator-project-config
|
36
tips/how_to_test_pr.md
Normal file
36
tips/how_to_test_pr.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Example for ollama
|
||||
|
||||
```nix
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.server.ollama;
|
||||
nvidiaEnabled = config.modules.system.hardware.nvidia.enable;
|
||||
nixpkgsPr = builtins.fetchTarball {
|
||||
url = "https://github.com/abysssol/nixpkgs/archive/ollama-driver-runpath.tar.gz";
|
||||
sha256 = "1ixfvdpi2v4r9yrkvqnfk9whs8lyjhrkdph47bcznh8ak9aipr8p";
|
||||
};
|
||||
in
|
||||
{
|
||||
disabledModules = [ "services/misc/ollama.nix" ];
|
||||
imports = [
|
||||
(import "${nixpkgsPr}/nixos/modules/services/misc/ollama.nix")
|
||||
];
|
||||
|
||||
options.modules.system.server.ollama = {
|
||||
enable = mkEnableOption ''
|
||||
Enable ollama with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
|
||||
package = (import nixpkgsPr { inherit (pkgs) system; config.allowUnfree = true; }).ollama;
|
||||
|
||||
acceleration = if nvidiaEnabled then "cuda" else null;
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
24
tips/test_on_vm.md
Normal file
24
tips/test_on_vm.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
## Configure VM
|
||||
|
||||
Configure VM
|
||||
```nix
|
||||
users.users.<user>.initialPassword = "<password>";
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
virtualisation = {
|
||||
memorySize = <RAM in MiB>; # Use 8192MiB memory.
|
||||
cores = <CPU Core number>;
|
||||
# And more here https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/virtualisation/qemu-vm.nix
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Build
|
||||
```bash
|
||||
nixos-rebuild build-vm --flake .#nixos-test
|
||||
```
|
||||
|
||||
Run
|
||||
```bash
|
||||
./result/bin/run-nixos-vm-vm
|
||||
```
|
Loading…
Add table
Reference in a new issue