Compare commits

..

91 Commits

Author SHA1 Message Date
7d07de663d add qemu 2025-05-31 23:15:36 +02:00
f19a3d129c use nvidia again 2025-05-31 23:15:12 +02:00
89fde794b8 rdp and lanzaboot 2025-04-20 23:20:04 +02:00
f451095a92 enable xrdp 2024-12-31 17:59:42 +01:00
3fad8fcf16 try to fix x11 on amd only 2024-12-31 17:58:35 +01:00
415ea15ea0 commit changes 2024-12-31 17:58:22 +01:00
48f1d774c9 add amd-igpu only config 2024-12-31 17:52:10 +01:00
b4e3457721 clean up redundant lines 2024-12-10 09:22:22 +01:00
21f5a618fa move steam to shared module 2024-12-10 09:21:33 +01:00
99b30e124a add triliumnext 2024-12-10 09:18:29 +01:00
b891969c7e add remmina 2024-12-10 09:18:17 +01:00
1cb2a609a8 add shell 2024-12-10 09:18:02 +01:00
4ff075bce4 add trilium-next 2024-12-10 09:17:50 +01:00
a496d0451b add another sops master key 2024-12-10 05:16:09 +01:00
c606f39f8f ignore vscode settings json 2024-12-10 03:58:50 +01:00
b779b84242 try to bring back gnome remote desktop (bugged upstream, no bueno, wait for fix) 2024-12-10 03:58:32 +01:00
8c0ecd90e8 clean up formatting 2024-12-10 03:57:00 +01:00
092691c665 list all inputs 2024-12-10 03:56:20 +01:00
718ca864e3 Add shared system config module 2024-12-10 03:53:46 +01:00
4454eb84fb whatever, still sorta works 2024-12-09 23:35:27 +01:00
f7823d9ad3 stable x11 config 2024-12-09 22:25:47 +01:00
72cac1e8c6 working x11 prime config 2024-12-07 21:05:09 +01:00
cf95749f84 Add synergy ports to firewall config 2024-12-07 21:04:07 +01:00
9ca20b8e24 bla 2024-12-07 18:03:00 +01:00
2f5a44b112 fix error 2024-12-07 18:02:49 +01:00
c29cae486e fix warning 2024-12-07 18:02:43 +01:00
769e1c166a try to fix modesetting 2024-12-07 18:02:36 +01:00
5a36dbc083 enable new config 2024-12-07 17:47:05 +01:00
b8d94f015f add new graphics config for testing 2024-12-07 17:46:30 +01:00
0aa885e2e4 synergy 2024-12-07 17:46:18 +01:00
94c2c9d7d5 removed redundant pkgs. prefix 2024-12-07 16:54:09 +01:00
e2086b228b buncha changes 2024-12-07 16:49:26 +01:00
3bff766ee2 add zen browser 2024-11-28 14:20:22 +01:00
f59cee41b9 Move config to working module 2024-11-27 17:12:17 +01:00
fc9c0c947c Working state with hibernation and good gaming performance on KDE 2024-11-27 16:04:28 +01:00
83db3ded50 hibernation works now 2024-11-26 14:37:36 +01:00
7645da455e swap 2024-11-21 19:26:36 +01:00
d16b77a13a fix spelling error 2024-11-21 11:05:07 +01:00
fce0f24737 add terraform to drivebystation-nix 2024-11-21 11:02:47 +01:00
8000ec4cf5 Merge branch 'trunk' of ssh://git.subsonics.nl:2222/andreas/nixos-config into trunk 2024-11-21 11:01:04 +01:00
c3b39f9991 remove partial line 2024-11-21 10:59:49 +01:00
a8c11752d4 changes 2024-11-21 10:59:28 +01:00
15d3daa1c8 add beeper to th0nkpad 2024-11-21 10:16:40 +01:00
f66ad0b662 try readding the other packages with the system being in a working state 2024-11-13 05:55:48 +01:00
1624697a7c enable the other modules on boot 2024-11-13 05:54:57 +01:00
d33e276dd3 enable fbdev 2024-11-13 05:49:01 +01:00
690851ede3 switch to xanmod kernel 2024-11-13 05:48:52 +01:00
2048c12baa this does not 2024-11-13 05:22:44 +01:00
96acd705cb this sorta worked 2024-11-13 05:22:21 +01:00
ab2413d3c6 attempt to fix framebuffer corruption and random sleep issues 2024-11-13 03:12:10 +01:00
c3b3bdd6c2 upgrade to beta driver 2024-11-13 03:11:08 +01:00
e7c6413503 attempt to fix gamescope 2024-11-13 02:58:30 +01:00
8f228a50bc test fbdev 2024-11-13 02:58:19 +01:00
cccadc89c4 fix modeset by enabling nvidia-drm as a boot init module 2024-11-13 02:58:06 +01:00
12d32846a2 attempt gamescope fix 2024-11-13 02:32:57 +01:00
a5eafae831 fixed another renamed key warning 2024-11-13 02:32:43 +01:00
e2fd2ba798 fix renamed key warning 2024-11-13 02:32:22 +01:00
aee5e664c1 solved no signal on TTY by disabling fbdev and modeset kernel params 2024-11-13 01:58:51 +01:00
27374f058c add steelseries-udev and hello packages 2024-11-13 01:55:10 +01:00
da2b430ead add missing file and callpackage as import 2024-11-13 01:54:31 +01:00
830f8d51b3 add missing parts of the dir structure 2024-11-12 22:54:37 +01:00
59032852f0 add sample hello package (copied from nixpkgs) 2024-11-12 22:54:06 +01:00
8df8a7ed39 add required packages for interfacing with ntfs and modifying partitions 2024-11-12 22:53:35 +01:00
6d3c3630a1 add obsidian to andreas@drivebystation 2024-11-12 22:53:11 +01:00
f26e79c734 update hardware config 2024-11-12 22:52:54 +01:00
2adff754bd update hardware config 2024-11-12 22:52:35 +01:00
3097ba6084 add vscode task for building 2024-11-12 22:49:01 +01:00
cae95f99af commit working state to prevent future breakage 2024-11-11 21:49:11 +01:00
5aded84ef9 add acer display OC EDID 2024-11-10 22:44:40 +01:00
b03e28e889 add qbittorrent and discord to home 2024-11-10 22:16:12 +01:00
2137ea62c5 Move wine and bottles to system packages and fix steelseries-udev 2024-11-10 22:15:37 +01:00
e2c080693c add steelseries stuff 2024-11-10 06:37:03 +01:00
ff6ee6b805 move gnome customizations to separate module 2024-11-10 04:36:08 +01:00
040476fabc Enable Fractional scaling for GNOME on drivebystation-nix 2024-11-10 04:31:39 +01:00
0b74e05cde configure steam 2024-11-10 04:18:50 +01:00
65fe6030ac add beeperr to drivebystation-nix 2024-11-10 04:18:36 +01:00
5325c20286 add steam, nvidia drivers, and fix gnome titlebars 2024-11-09 20:33:21 +01:00
4244e6918a update configuration.nix 2024-11-09 18:16:41 +01:00
88a4f25fa5 Added nixos config for battlestation 2024-11-09 18:13:57 +01:00
066b45427a fix home manager config 2024-11-07 14:27:43 +01:00
01f1e82284 fix home-manager and misc changes 2024-11-07 14:17:25 +01:00
dea19e0b3b Various formatting changes 2024-11-07 09:59:01 +01:00
8b68c27a1f add sops-nix to inputs 2024-11-07 09:58:14 +01:00
a380d9487f cleared whitespace 2024-11-07 09:06:17 +01:00
542b74f944 updated flake 2024-11-07 09:06:04 +01:00
d2dceba0e9 Add configurable stream-tools option 2024-11-05 13:51:12 +01:00
9dab2276d6 update flake to use snowfall 2024-10-08 23:12:28 +02:00
2dfd24b2a9 Disable XRDP in favor of using gnomes built in RDP 2024-10-08 21:51:33 +02:00
9713048cfd add spotify 2024-10-08 19:53:21 +02:00
4f434935f0 add default.nix to sys config dirs 2024-10-08 17:51:03 +00:00
78a9a4c493 specify hostname 2024-10-08 17:45:26 +00:00
47 changed files with 2331 additions and 259 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.vscode/settings.json

13
.sops.yaml Normal file
View File

@@ -0,0 +1,13 @@
keys:
- users:
- &andreas age19j24x89dfh4f7v58c8k64yupqas4f7qkkyper7yj9dd7vqwvvq0qkyvhxk # generated using cli
- hosts:
- &th0nkpad-nixos age1ma8x6wugvc40mkst33mejq0m6r44jk6zwjjun3znyer5nztgn9vs0nwjx4 # derived from ssh host key
- &drivebystation-nix age1s5qwsuc3e4m3c4w5hl6tyja70w273gr60j9j9dcpc6mz69lemg3qpwud3h #derived from ssh host key
creation_rules:
- path_regex: secrets.yaml$
key_groups:
- age:
- *andreas
- *th0nkpad-nixos
- *drivebystation-nix

21
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,21 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "nixos-rebuild",
"command": "bash",
"args": [
"-c",
"sudo nixos-rebuild switch --flake ."
],
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

537
flake.lock generated
View File

@@ -1,5 +1,20 @@
{ {
"nodes": { "nodes": {
"crane": {
"locked": {
"lastModified": 1731098351,
"narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
"owner": "ipetkov",
"repo": "crane",
"rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@@ -19,11 +34,43 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1717312683,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -35,16 +82,16 @@
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nix", "lanzaboote",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1719994518, "lastModified": 1730504689,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", "rev": "506278e768c2a08bec68eb62932193e341f55c90",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -58,11 +105,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1726560853, "lastModified": 1731533236,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -71,89 +118,162 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks-nix": { "flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils_2"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"flake-utils_2": {
"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"
}
},
"game-of-life": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1728511087,
"narHash": "sha256-CvO74jwMjUUPySy0QCt7sPImbxKlhWcSAet93Fkt6iU=",
"owner": "local-interloper",
"repo": "game-of-life",
"rev": "c39d37e394f5da79a6a7d198e1d7e505aa5298a7",
"type": "github"
},
"original": {
"owner": "local-interloper",
"repo": "game-of-life",
"type": "github"
}
},
"gitignore": {
"inputs": { "inputs": {
"flake-compat": [
"nix"
],
"gitignore": [
"nix"
],
"nixpkgs": [ "nixpkgs": [
"nix", "lanzaboote",
"nixpkgs" "pre-commit-hooks-nix",
],
"nixpkgs-stable": [
"nix",
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1721042469, "lastModified": 1709087332,
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "cachix", "owner": "hercules-ci",
"repo": "git-hooks.nix", "repo": "gitignore.nix",
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "cachix", "owner": "hercules-ci",
"repo": "git-hooks.nix", "repo": "gitignore.nix",
"type": "github" "type": "github"
} }
}, },
"libgit2": { "home-manager": {
"flake": false,
"locked": {
"lastModified": 1715853528,
"narHash": "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY=",
"owner": "libgit2",
"repo": "libgit2",
"rev": "36f7e21ad757a3dacc58cf7944329da6bc1d6e96",
"type": "github"
},
"original": {
"owner": "libgit2",
"ref": "v1.8.1",
"repo": "libgit2",
"type": "github"
}
},
"nix": {
"inputs": { "inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1735381016,
"narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"git-hooks-nix": "git-hooks-nix", "nixpkgs": [
"libgit2": "libgit2", "nixpkgs"
"nixpkgs": "nixpkgs", ],
"nixpkgs-23-11": "nixpkgs-23-11", "pre-commit-hooks-nix": "pre-commit-hooks-nix",
"nixpkgs-regression": "nixpkgs-regression" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1728310575, "lastModified": 1737639419,
"narHash": "sha256-R13o8hNhzuTuEwUBViVOmT4OM0/I2d9DxnkxQOip1yg=", "narHash": "sha256-AEEDktApTEZ5PZXNDkry2YV2k6t0dTgLPEmAZbnigXU=",
"owner": "NixOS", "owner": "nix-community",
"repo": "nix", "repo": "lanzaboote",
"rev": "26c3fc11eada3fa7df0284190095868a947fefe2", "rev": "a65905a09e2c43ff63be8c0e86a93712361f871e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nix", "owner": "nix-community",
"type": "indirect" "ref": "v0.4.2",
"repo": "lanzaboote",
"type": "github"
}
},
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable_2",
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1735608992,
"narHash": "sha256-NkzMjar9Sz0pLJxVfp9Hchf48YCuQQ1AnGVYGNfzwVA=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "af6900c2f6e68439c5f4aaaa8bb1a6d54bf04025",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
} }
}, },
"nixos-wsl": { "nixos-wsl": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_3",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1728299182, "lastModified": 1733854371,
"narHash": "sha256-wzxKH5DyG+uyhnGtP8YmN3LCYtEyYR/4fhjKVY2Rtxg=", "narHash": "sha256-K9qGHniYBbjqVcEiwXyiofj/IFf78L5F0/FCf+CKyr0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NixOS-WSL", "repo": "NixOS-WSL",
"rev": "830b6a752d0097c2043985ff4c1203aba07b268d", "rev": "dee4425dcee3149475ead0cb6a616b8a028c5888",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -165,11 +285,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1723688146, "lastModified": 1717179513,
"narHash": "sha256-sqLwJcHYeWLOeP/XoLwAtYjr01TISlkOfz+NG82pbdg=", "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c3d4ac725177c030b1e289015989da2ad9d56af0", "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -179,61 +315,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-23-11": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1717159533, "lastModified": 1735531152,
"narHash": "sha256-oamiKNfr2MS6yH64rUn99mIZjc45nGJlj9eGth/3Xuw=", "narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446", "rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a62e6edd6d5e1fa0329b8653c801147986f8d446",
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1728193676, "lastModified": 1735471104,
"narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=", "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6", "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1728241625,
"narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c31898adf5a8ed202ce5bea9f347b1c6871f32d1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -243,11 +347,177 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": {
"locked": {
"lastModified": 1733384649,
"narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1735471104,
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1727348695,
"narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
"lanzaboote",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"lanzaboote",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1731363552,
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"nix": "nix", "game-of-life": "game-of-life",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"nixos-cosmic": "nixos-cosmic",
"nixos-wsl": "nixos-wsl", "nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4",
"snowfall-lib": "snowfall-lib",
"sops-nix": "sops-nix",
"trilium-next-pr": "trilium-next-pr",
"zen-browser": "zen-browser"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1731897198,
"narHash": "sha256-Ou7vLETSKwmE/HRQz4cImXXJBr/k9gp4J4z/PF8LzTE=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "0be641045af6d8666c11c2c40e45ffc9667839b5",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"nixos-cosmic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1735525800,
"narHash": "sha256-pcN8LAL021zdC99a9F7iEiFCI1wmrE4DpIYUgKpB/jY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "10faa81b4c0135a04716cbd1649260d82b2890cd",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1732544274,
"narHash": "sha256-qvzLIxuqukl0nxpXHEh5+iw1BLeLxYOwRC0+7cFUbPo=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "cfeacd055545ab5de0ecfd41e09324dcd8fb2bbb",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1735468296,
"narHash": "sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8=",
"owner": "mic92",
"repo": "sops-nix",
"rev": "bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27",
"type": "github"
},
"original": {
"owner": "mic92",
"repo": "sops-nix",
"type": "github"
} }
}, },
"systems": { "systems": {
@@ -264,6 +534,55 @@
"repo": "default", "repo": "default",
"type": "github" "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"
}
},
"trilium-next-pr": {
"locked": {
"lastModified": 1733744893,
"narHash": "sha256-CufsQ+I/s7TsPd6Rq62WAQZQDtoeC8nw+ExuXeWnDRk=",
"owner": "FliegendeWurst",
"repo": "nixpkgs",
"rev": "6000de6a3f96f729ef031cbd4ecb04898cb38780",
"type": "github"
},
"original": {
"owner": "FliegendeWurst",
"ref": "trilium-next",
"repo": "nixpkgs",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1736824652,
"narHash": "sha256-8J56ngRvKVvCxdY3iDtol/9UAJfwCh0k96DnyNchUCA=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "a17923b5fd758700c67afdaae2a1d3123381f96b",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

198
flake.nix
View File

@@ -2,110 +2,126 @@
description = "Nixos config flake test"; description = "Nixos config flake test";
inputs = { inputs = {
# nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
# Snowfallorg's Flake utility
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { self, nixpkgs, nixos-wsl, nix, ... }@inputs: game-of-life.url = "github:local-interloper/game-of-life";
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
# Add sops-nix for secrets management
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser.url = "github:0xc000022070/zen-browser-flake";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
trilium-next-pr.url = "github:FliegendeWurst/nixpkgs/trilium-next";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.2";
# Optional but recommended to limit the size of your system closure.
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
let let
system = lib = inputs.snowfall-lib.mkLib {
if builtins ? currentSystem inherit inputs;
then builtins.currentSystem src = ./.;
else "x86_64-linux";
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; channels-config = {
installedPackages = (import ./installed-packages { inherit pkgs; }); allowUnfree = true;
allowUnfreePredicate = _: true;
permittedInsecurePackages = [ "openssl-1.1.1w" ];
};
# Configure Snowfall Lib, all of these settings are optional.
snowfall = {
# Tell Snowfall Lib to look in the `./nix/` directory for your
# Nix files.
root = ./.;
# Choose a namespace to use for your flake's packages, library,
# and overlays.
namespace = "my-namespace";
# Add flake metadata that can be processed by tools like Snowfall Frost.
meta = {
# A slug to use in documentation when displaying things like file paths.
name = "nixos-config-hionv";
# A title to show for your flake, typically the name.
title = "Hion's Personal NixOS Config";
};
};
};
in in
lib.mkFlake {
inherit inputs;
src = ./.;
nixos = with inputs; [
# disko.nixosModules.disko
# impermanence.nixosModules.impermanence
home-manager.nixosModules.home-manager
{ {
nixosConfigurations.drivebystation-nixos-wsl = nixpkgs.lib.nixosSystem { home-manager = {
inherit system; useGlobalPkgs = true;
modules = [ useUserPackages = true;
nixos-wsl.nixosModules.default };
./systems/drivebystation-nixos-wsl/configuration.nix }
{ # nix-ld.nixosModules.nix-ld
system.stateVersion = "24.05"; # sops-nix.nixosModules.sops
wsl.enable = true; # stylix.nixosModules.stylix
nix.settings.experimental-features = [ "nix-command" "flakes" ]; ];
systems.modules.nixos = with inputs; [
# my-input.nixosModules.my-module
lanzaboote.nixosModules.lanzaboote ({ pkgs, lib, ... }: {
environment.systemPackages = [ environment.systemPackages = [
# For debugging and troubleshooting Secure Boot.
pkgs.sbctl
];
] # Lanzaboote currently replaces the systemd-boot module.
++ installedPackages.mkPackages.packages; # This setting is usually set to true in configuration.nix
programs.nix-ld = { # generated at installation time. So we force it to false
# for now.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true; enable = true;
package = pkgs.nix-ld-rs; pkiBundle = "/var/lib/sbctl";
}; };
} })
]; ];
specialArgs = { inherit inputs; };
}; # The attribute set specified here will be passed directly to NixPkgs when
nixosConfigurations.th0nkpad-nixos = nixpkgs.lib.nixosSystem { # instantiating the package set.
inherit system; channels-config = {
modules = [ # Allow unfree packages.
./systems/th0nkpad-nixos/configuration.nix allowUnfree = true;
{
system.stateVersion = "24.05"; # # Allow certain insecure packages
nix.settings.experimental-features = [ "nix-command" "flakes" ]; # permittedInsecurePackages = [
# Define a user account. Don't forget to set a password with passwd. # "firefox-100.0.0"
users.users.andreas = { # ];
isNormalUser = true;
description = "Andreas"; # # Additional configuration for specific packages.
extraGroups = [ "networkmanager" "wheel" ]; # config = {
packages = with pkgs; [ # # For example, enable smartcard support in Firefox.
flatpak # firefox.smartcardSupport = true;
gnome-software # };
soundwireserver
vscode
spotify
# thunderbird
];
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
59010 #SoundWireServer
3389 #RDP
];
networking.firewall.allowedUDPPorts = [
59010 #SoundWireServer
3389 #RDP
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Install firefox.
programs.firefox.enable = true;
# Set up system Packages
environment.systemPackages = with pkgs; [
git
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
]
++ installedPackages.mkPackages.packages;
programs.nix-ld = {
enable = true;
package = pkgs.nix-ld-rs;
};
services.flatpak.enable = true;
systemd.services.flatpak-repo = {
wantedBy = [ "multi-user.target" ];
path = [ pkgs.flatpak ];
script = ''
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
'';
};
# services.xrdp.enable = true;
# services.xrdp.defaultWindowManager = "${pkgs.gnome-session}/bin/gnome-session";
# # services.xrdp.openFirewall = true;
# # Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI!
# # If no user is logged in, the machine will power down after 20 minutes.
# systemd.targets.sleep.enable = false;
# systemd.targets.suspend.enable = false;
# systemd.targets.hibernate.enable = false;
# systemd.targets.hybrid-sleep.enable = false;
}
];
specialArgs = { inherit inputs; };
}; };
}; };
} }

View File

View File

@@ -0,0 +1,32 @@
{ config
, lib
, inputs
, pkgs
, ...
}:
let
inherit (lib.my-namespace) enabled;
in
{
imports = [
# ../modules.nix
];
my-namespace.home = {
stream-tools = enabled;
gnome-customizations = enabled;
# networking = enabled;
# personal-apps = enabled;
# suites.laptop = enabled;
};
home = {
packages = [
pkgs.nil
pkgs.gamemode
pkgs.beeper
pkgs.my-namespace.udev-steelseries
pkgs.qbittorrent
pkgs.vesktop
pkgs.obsidian
inputs.zen-browser.packages.x86_64-linux.default ];
};
}

View File

@@ -0,0 +1,25 @@
{ config
, lib
, pkgs
, ...
}:
let
inherit (lib.my-namespace) enabled;
in
{
imports = [
# ../modules.nix
];
my-namespace.home = {
stream-tools = enabled;
# networking = enabled;
# personal-apps = enabled;
# suites.laptop = enabled;
};
home = {
packages = [
pkgs.nil
pkgs.beeper
];
};
}

View File

@@ -0,0 +1,30 @@
{ config
, lib
, pkgs
, ...
}:
let
inherit (lib.my-namespace) enabled;
in
{
imports = [
# ../modules.nix
];
my-namespace.home = {
stream-tools = enabled;
gnome-customizations = enabled;
# networking = enabled;
# personal-apps = enabled;
# suites.laptop = enabled;
};
home = {
packages = [
pkgs.nil
pkgs.gamemode
pkgs.beeper
pkgs.my-namespace.udev-steelseries
pkgs.qbittorrent
pkgs.vesktop
];
};
}

View File

@@ -1,21 +0,0 @@
{ pkgs }:
let
baseBackages = [
pkgs.vim
pkgs.nixpkgs-fmt
];
utilPackages = [
pkgs.wget
pkgs.curl
pkgs.git
pkgs.ffmpeg
];
haxeDevelopmentPackages = [
pkgs.haxe
];
in
{
mkPackages = {
packages = baseBackages ++ utilPackages ++ haxeDevelopmentPackages;
};
}

View File

@@ -1,21 +0,0 @@
{ pkgs }:
let
baseBackages = [
pkgs.vim
pkgs.nixpkgs-fmt
];
utilPackages = [
pkgs.wget
pkgs.curl
pkgs.git
pkgs.ffmpeg
];
haxeDevelopmentPackages = [
pkgs.haxe
];
in
{
mkPackages = {
packages = baseBackages ++ utilPackages ++ haxeDevelopmentPackages;
};
}

32
lib/default.nix Normal file
View File

@@ -0,0 +1,32 @@
{lib, ...}: let
inherit (lib) mkOption strings;
inherit (lib.attrsets) filterAttrs mapAttrsToList;
inherit (lib.types) bool;
in rec {
disabled = {enable = false;};
enabled = {enable = true;};
ifThenElse = cond: t: f:
if cond
then t
else f;
mkOpt = type: default: description:
mkOption {inherit type default description;};
mkOpt' = type: default: mkOpt type default null;
mkBoolOpt = mkOpt bool;
mkBoolOpt' = mkOpt' bool;
mkPxeMenu = args:
''
UI menu.c32
TIMEOUT 300
''
+ strings.concatStringsSep "\n" (mapAttrsToList
(
name: value: ''
LABEL ${name}
MENU LABEL ${value.content.label}
KERNEL ${value.content.kernel}
append ${value.content.append}
''
)
(filterAttrs (_: v: v.condition) args));
}

View File

@@ -0,0 +1,45 @@
{
# This is the merged library containing your namespaced library as well as all libraries from
# your flake's inputs.
lib
, # Your flake inputs are also available.
inputs
, # The namespace used for your flake, defaulting to "internal" if not set.
namespace
, # Additionally, Snowfall Lib's own inputs are passed. You probably don't need to use this!
snowfall-inputs
, ...
}:
{
# This will be available as `lib.my-namespace.mkPackages`.
mkPackages = {pkgs, ...}:
let
inherit pkgs;
# pkgs = namespace.;
# pkgs = snowfall-inputs.nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; };
baseBackages = [
pkgs.vim
pkgs.nixpkgs-fmt
];
utilPackages = [
pkgs.wget
pkgs.curl
pkgs.git
pkgs.ffmpeg
];
haxeDevelopmentPackages = [
pkgs.haxe
];
in
{
packages = baseBackages ++ utilPackages ++ haxeDevelopmentPackages;
};
# my-scope = {
# # This will be available as `lib.my-namespace.my-scope.my-scoped-helper-function`.
# my-scoped-helper-function = x: x;
# };
}

View File

@@ -0,0 +1,19 @@
{ pkgs
, config
, lib
, ...
}:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.my-namespace.home.gnome-customizations;
in
{
options.my-namespace.home.gnome-customizations = {
enable = mkEnableOption "Enable GNOME customizations";
};
config = mkIf cfg.enable {
# GNOME settings
dconf.settings."org/gnome/desktop/wm/preferences".button-layout = "appmenu:,minimize,maximize,close";
dconf.settings."org/gnome/mutter".experimental-features = [ "scale-monitor-framebuffer" ];
};
}

View File

@@ -0,0 +1,78 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib
, # An instance of `pkgs` with your overlays and packages applied is also available.
pkgs
, # You also have access to your flake's inputs.
inputs
, # Additional metadata is provided by Snowfall Lib.
namespace
, # The namespace used for your flake, defaulting to "internal" if not set.
system
, # The system architecture for this host (eg. `x86_64-linux`).
target
, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format
, # A normalized name for the system target (eg. `iso`).
virtual
, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems
, # An attribute map of your defined hosts.
# All other arguments come from the module system.
config
, ...
}:
let
inherit (lib) mkIf;
inherit (lib.my-namespace) enabled;
imp = config.my-namespace.home.impermanence.enable;
in
{
config = {
home = {
packages = with pkgs; [
inetutils
neofetch
tmux
# nerdfonts
p7zip
rclone
ripgrep
unzip
zip
];
sessionPath = [ "$HOME/bin" "$HOME/.local/bin" ];
shellAliases = {
# "df" = "duf -only local";
# "du" = "dust -xd1 --skip-total";
# # "ducks" = "du -chs * 2>/dev/null | sort -rh | head -11 && du -chs .* 2>/dev/null | sort -rh | head -11";
# "gmount" = "rclone mount google:/ ~/Drive/";
"df" = "df -h";
"nano" = "vim";
};
stateVersion = "24.05";
};
# manual = {
# html.enable = false;
# manpages.enable = false;
# json.enable = false;
# };
programs = {
bash = {
enable = true;
enableCompletion = true;
enableVteIntegration = true;
};
dircolors = enabled;
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv = enabled;
};
home-manager = enabled;
};
services = { };
};
}

View File

@@ -0,0 +1,28 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my-namespace.home.stream-tools;
in {
options.my-namespace.home.stream-tools = {
enable = mkEnableOption "Enable the Stream Machine Tools";
};
config = mkIf cfg.enable {
programs.obs-studio = {
enable = true;
plugins = [ pkgs.obs-studio-plugins.droidcam-obs ];
};
home = {
packages = with pkgs; [
# obs-studio
droidcam
];
};
};
}

View File

@@ -0,0 +1,32 @@
{ config
, lib
, inputs
, pkgs
, ...
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (lib.my-namespace) disabled enabled;
cfg = config.my-namespace.cosmic-desktop;
# moduleImports = {
# "enabled" = [inputs.nixos-cosmic.nixosModules.default];
# "disabled" = [];
# };
# optionalImports = { imports = []; };
in
{
options.my-namespace.cosmic-desktop = {
enable = mkEnableOption "Enable nvidia";
};
imports = [ inputs.nixos-cosmic.nixosModules.default ];
config = mkIf cfg.enable {
nix.settings = {
substituters = [ "https://cosmic.cachix.org/" ];
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
};
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
};
}

View File

@@ -0,0 +1,57 @@
{ config
, lib
, pkgs
, ...
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (lib.my-namespace) disabled enabled;
cfg = config.my-namespace.hardware.graphics-amd-igpu-only;
in
{
options.my-namespace.hardware.graphics-amd-igpu-only = {
enable = mkEnableOption "Enable nvidia";
};
config = mkIf cfg.enable {
# Enable NVIDIA driver for X11 and Wayland
# without modesetting, x server will be run by nvidia
services.xserver.videoDrivers = [
"amdgpu"
];
# Enable OpenGL
hardware.graphics = {
enable = true;
# extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
hardware.graphics.enable32Bit = true; # For 32 bit applications
boot.loader.systemd-boot.consoleMode = "max";
# Enable required Kernel Modules
boot.initrd.kernelModules = [
"amdgpu"
];
boot.kernelParams = [
"amdgpu.modeset=1"
"amd_iommu=on"
];
# Blacklist intel and nouveau
boot.blacklistedKernelModules = [
"nouveau"
];
# Modesetting is required.
# Add user to extra groups
users.users.andreas = {
extraGroups = [ "video" "render" ];
};
};
}

View File

@@ -0,0 +1,176 @@
{ config
, lib
, pkgs
, ...
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (lib.my-namespace) disabled enabled;
cfg = config.my-namespace.hardware.graphics-nvidia-prime-amd-testing;
in
{
options.my-namespace.hardware.graphics-nvidia-prime-amd-testing = {
enable = mkEnableOption "Enable nvidia";
};
config = mkIf cfg.enable {
# Enable NVIDIA driver for X11 and Wayland
# without modesetting, x server will be run by nvidia
services.xserver.videoDrivers = [
"nvidia"
# "nvidia-drm"
# "nvidia-uvm"
# "nvidia-modeset"
# "nvidiafb"
"amdgpu"
# "modesetting"
];
# Enable OpenGL
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
hardware.graphics.enable32Bit = true; # For 32 bit applications
# Enable Switcheroo
services.switcherooControl.enable = true;
# Use Beta Driver Package
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
boot.loader.systemd-boot.consoleMode = "max";
# Enable required Kernel Modules
boot.initrd.kernelModules = [
"nvidia"
"nvidia-drm"
"nvidia-uvm"
"nvidia-modeset"
"nvidiafb"
"amdgpu"
# # "i2c-nvidia_gpu"
];
boot.kernelParams = [
# "amdgpu.modeset=1"
# "nvidia-drm.fbdev=1"
# "nvidia-drm.modeset=1"
# # "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
"amd_iommu=on"
# "vfio-pci.ids=\"10de:2489,10de:228b\""
# "nomodeset"
# "nvidia_drm.modeset=1"
];
# Blacklist intel and nouveau
boot.blacklistedKernelModules = [
# "i915"
"nouveau"
# "nvidia"
# "nvidia-drm"
# "nvidia-uvm"
# "nvidiafb"
# "nvidia_drm"
# "nvidia_modeset"
];
# Extra blacklist nouveau
# boot.extraModprobeConfig = ''
# blacklist nouveau
# options nouveau modeset=0
# '';
# services.xserver.config = lib.mkForce ''
# Section "ServerLayout"
# Identifier "layout"
# Screen 0 "amdgpu"
# Inactive "nvidia"
# Option "AllowNVIDIAGPUScreens"
# EndSection
# Section "Device"
# Identifier "nvidia"
# Driver "nvidia"
# BusID "PCI:01:0:0"
# EndSection
# Section "Screen"
# Identifier "nvidia"
# Device "nvidia"
# EndSection
# Section "Device"
# Identifier "amdgpu"
# Driver "amdgpu"
# BusID "PCI:50:0:0"
# EndSection
# Section "Screen"
# Identifier "amdgpu"
# Device "amdgpu"
# EndSection
# '';
# Configure NVIDIA driver
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = 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;
# 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 = false;
# 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.beta;
# package = config.boot.kernelPackages.nvidiaPackages.none;
# package = config.boot.kernelPackages.nvidiaPackages.production;
nvidiaPersistenced = true;
forceFullCompositionPipeline = true;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
# sync.enable=true;
# reverseSync.enable = false;
# Make sure to use the correct Bus ID values for your system!
# intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
};
};
# Add user to extra groups
users.users.andreas = {
extraGroups = [ "video" "render" ];
};
};
}

View File

@@ -0,0 +1,131 @@
{ config
, lib
, pkgs
, ...
}:
let
inherit (lib) mkEnableOption mkIf;
inherit (lib.my-namespace) disabled enabled;
cfg = config.my-namespace.hardware.graphics-nvidia-prime-amd;
in
{
options.my-namespace.hardware.graphics-nvidia-prime-amd = {
enable = mkEnableOption "Enable nvidia";
};
config = mkIf cfg.enable {
# Enable NVIDIA driver for X11 and Wayland
services.xserver.videoDrivers = [ "amdgpu" "nvidia" ];
# Enable OpenGL
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
# Use Beta Driver Package
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
boot.loader.systemd-boot.consoleMode = "max";
# Enable required Kernel Modules
boot.initrd.kernelModules = [
"amdgpu"
"nvidia"
# "nvidia-drm"
"nvidiafb"
# "nvidia-uvm"
# "nvidia-modeset"
# "i2c-nvidia_gpu"
];
boot.kernelParams = [
"amdgpu.modeset=1"
"nvidia-drm.fbdev=1"
"nvidia-drm.modeset=0"
# "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
"amd_iommu=on"
# "vfio-pci.ids=\"10de:2489,10de:228b\""
# "nomodeset"
# "nvidia_drm.modeset=1"
];
# Blacklist intel and nouveau
boot.blacklistedKernelModules = [
"i915"
"nouveau"
# "nvidia"
# "nvidia-drm"
# "nvidia-uvm"
# "nvidiafb"
# "nvidia_drm"
# "nvidia_modeset"
];
# Extra blacklist nouveau
boot.extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0
'';
# Configure NVIDIA driver
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = 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;
# 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 = false;
# 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.beta;
# package = config.boot.kernelPackages.nvidiaPackages.none;
# package = config.boot.kernelPackages.nvidiaPackages.production;
forceFullCompositionPipeline = false;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
reverseSync.enable = false;
# Make sure to use the correct Bus ID values for your system!
# intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:01:0:0";
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
};
};
# Add user to extra groups
users.users.andreas = {
extraGroups = [ "video" "render" ];
};
};
}

View File

@@ -0,0 +1,53 @@
############################################
#
# Shared System Configuration module that's always enabled by default courtesy of snowfall lib
#
############################################
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib
, # An instance of `pkgs` with your overlays and packages applied is also available.
pkgs
, # You also have access to your flake's inputs.
inputs
, # Additional metadata is provided by Snowfall Lib.
namespace
, # The namespace used for your flake, defaulting to "internal" if not set.
system
, # The system architecture for this host (eg. `x86_64-linux`).
target
, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format
, # A normalized name for the system target (eg. `iso`).
virtual
, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems
, # An attribute map of your defined hosts.
# All other arguments come from the module system.
config
, ...
}:
let
inherit (lib) mkIf;
inherit (lib.my-namespace) enabled;
in
{
config = {
boot = { };
console = { };
environment = {
systemPackages =
(with pkgs; [
age
wget
sops
bitwarden
bitwarden-cli
cowsay
remmina
]);
};
};
}

View File

@@ -0,0 +1,75 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
# The namespace used for your flake, defaulting to "internal" if not set.
namespace,
# The system architecture for this host (eg. `x86_64-linux`).
system,
# The Snowfall Lib target for this system (eg. `x86_64-iso`).
target,
# A normalized name for the system target (eg. `iso`).
format,
# A boolean to determine whether this system is a virtual target using nixos-generators.
virtual,
# An attribute map of your defined hosts.
systems,
# All other arguments come from the system system.
config
, ...
}:{
config = {
# programs.gamescope = {
# enable = true;
# capSysNice = true;
# };
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
# gamescopeSession = {
# enable = true;
# env = {
# WLR_RENDERER = "vulkan";
# DXVK_HDR = "0 ";
# ENABLE_GAMESCOPE_WSI = "0";
# WINE_FULLSCREEN_FSR = "1";
# # Games allegedly prefer X11
# SDL_VIDEODRIVER = "x11";
# };
# args = [
# "--xwayland-count 1"
# "--expose-wayland"
# "-e" # Enable steam integration
# "--steam"
# # "--adaptive-sync"
# # "--hdr-enabled"
# # "--hdr-itm-enable"
# # External monitor
# "--prefer-output DP-3"
# "--output-width 1920"
# "--output-height 1080"
# "-r 172"
# # Laptop display
# # "--prefer-output eDP-1"
# # "--output-width 2560"
# # "--output-height 1600"
# # "-r 120"
# # "--prefer-vk-device 10de:1b81" # lspci -nn | grep VGA
# ];
# };
};
};
}

0
overlays/.gitkeep Normal file
View File

View File

@@ -0,0 +1,69 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# You also have access to your flake's inputs.
inputs,
# The namespace used for your flake, defaulting to "internal" if not set.
namespace,
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
# programmatically or you may add the named attributes as arguments here.
stdenv,
fetchurl,
nixos,
callPackage,
testers,
versionCheckHook,
hello,
...
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hello";
version = "2.12.1";
src = fetchurl {
url = "mirror://gnu/hello/hello-${finalAttrs.version}.tar.gz";
hash = "sha256-jZkUKv2SV28wsM18tCqNxoCZmLxdYH2Idh9RLibH2yA=";
};
# The GNU Hello `configure` script detects how to link libiconv but fails to actually make use of that.
# Unfortunately, this cannot be a patch to `Makefile.am` because `autoreconfHook` causes a gettext
# infrastructure mismatch error when trying to build `hello`.
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
NIX_LDFLAGS = "-liconv";
};
doCheck = true;
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
# Give hello some install checks for testing purpose.
postInstallCheck = ''
stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}"
'';
passthru.tests = {
version = testers.testVersion { package = hello; };
};
passthru.tests.run = callPackage ./test.nix { hello = finalAttrs.finalPackage; };
meta = {
description = "Program that produces a familiar, friendly greeting";
longDescription = ''
GNU Hello is a program that prints "Hello, world!" when you run it.
It is fully customizable.
'';
homepage = "https://www.gnu.org/software/hello/manual/";
changelog = "https://git.savannah.gnu.org/cgit/hello.git/plain/NEWS?h=v${finalAttrs.version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ stv0g ];
mainProgram = "hello";
platforms = lib.platforms.all;
};
})

8
packages/hello/test.nix Normal file
View File

@@ -0,0 +1,8 @@
{ runCommand, hello }:
runCommand "hello-test-run" {
nativeBuildInputs = [ hello ];
} ''
diff -U3 --color=auto <(hello) <(echo 'Hello, world!')
touch $out
''

View File

@@ -0,0 +1,48 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# You also have access to your flake's inputs.
inputs,
# The namespace used for your flake, defaulting to "internal" if not set.
namespace,
# All other arguments come from NixPkgs. You can use `pkgs` to pull packages or helpers
# programmatically or you may add the named attributes as arguments here.
pkgs,
stdenv,
fetchFromGitHub,
...
}:
stdenv.mkDerivation {
pname = "steelseries-udev-rules";
version = "unstable-2024-11-10";
src = fetchFromGitHub {
owner = "MiddleMan5";
repo = "steelseries-linux";
rev = "d93dfdb6daeec150578e85e25b2e9df79e9539b7";
sha256 = "sha256-yPw8QFKhlqb6lxQyYjBz34pEEfTVk1Yp9jFWdX5yH2k=";
};
dontBuild = true;
dontConfigure = true;
installPhase = ''
mkdir -p $out/lib/udev/rules.d
cp resources/98-steelseries.rules $out/lib/udev/rules.d/98-steelseries.rules
mkdir -p $out/etc/udev/rules.d
cp resources/98-steelseries-init.py $out/etc/udev/rules.d/98-steelseries-init.py
chmod +x $out/etc/udev/rules.d/98-steelseries-init.py
'';
meta = with lib; {
description = "udev rules for Steelseries devices";
license = licenses.unfree;
maintainers = with maintainers; [ asymmetric ];
platforms = platforms.linux;
homepage = "https://github.com/MiddleMan5/steelseries-linux";
};
}

51
secrets.yaml Normal file
View File

@@ -0,0 +1,51 @@
private-keys:
andreas: ENC[AES256_GCM,data:UMOMU5vd+kOvReBP+noCPopsP90uAx0UM5mLgsXX1obks3DvcW28yVpLR952CroDzUOYwpkQ+7MheBznZxVfG6+b36rzphIUyDXArix3c90mak+4fhkUFAxsAW2VeKzUTGEBIUiejtfW4sBaHoQVWpDBSLbGajB9GzBXspNR+J/nriD8xas9ZkvYvFM4BIKM5vFNQxCGUy44IyHffxtX9kHjboiSeIgK7Gj1hA4iC/byIBqTLzJOCBHQs3irs/CSbZgFR7MFuiqR2ZWVdJ1dKAr9fejd36muymsutVUDzTsq/P1Id0YlgnYVcpJxAMHKq8QEZu8yNLEzkr/QMxs5Z2Bu93CkiJDAGXJZvtipfLX0UtIkResCLBD40EKty8U2OnKwm4k3xzJoHRTZ3qVnJQGESYHTZHHumRRcDYJnQBL6iav50mG0KS0mfcoetoDTpQfxsi3OnLO7kjSP2fE8sSJRi363nfciBwH/TTf911HhD5ruOo3bQeryjtGN8Y+PAqvrILiIKPODvoRVqaka,iv:lvlaQwEzDpvdSjH6Z4NrzABifyVP5jyzERHP72CSbis=,tag:rmSINraNXFZElfFHZDqeeQ==,type:str]
andreas-password: ENC[AES256_GCM,data:XBvfrBSrlKzpO9vgmwQYJshlJH1OCMrcdfYMvp32ZOFZSf4/GrM/FRaatS7to+0ZgJlLNt+npSK0nwV8NXvwgHgN8bsuDiL7KQ==,iv:lD0ruX5AVKVfdA0/vpeUAPf5cTSExyaF8VWebFkbXV8=,tag:nAuwEkHGtlEzu8Qbe0ECdA==,type:str]
#ENC[AES256_GCM,data:aX2EVkOK7ivoDTzSMmonY64dU6mnRjE83sA3MFIPnzeJ5snZN8WY9PF1CmkDU/ZVB+j9Law=,iv:sPfVyBuGCyd/Y9Lw9cl0akA2IUE5/Yi5C07dh6Ioyu0=,tag:tOT5uHVdgYG+/E4ye0QcFg==,type:comment]
#ENC[AES256_GCM,data:djH8vAA+TvvbA/Jsuvca7E4o6pYTfKGGdK4=,iv:5Dw0niDhi7P6P9XRz2qgSL3CxpiXBtIsekOMycroLrA=,tag:OSvPPgq0kV4JskrQ86Qp5A==,type:comment]
#ENC[AES256_GCM,data:C1BstOPXnCf4Cr8UlanCegA=,iv:k9Me959xb6Weg/yArAIg5kWH36se/yyGWNQUu314uw0=,tag:x0bTh0bsYxbCX5GObsGI5g==,type:comment]
#ENC[AES256_GCM,data:Q0vsUrzlOgDICeIxXtc=,iv:gR8sYrtE/v9GGDEO2nj/v5IHr9ycXhvv1VcB/dEH/FU=,tag:FBde9vkRM/drFtpTWfLcNg==,type:comment]
#ENC[AES256_GCM,data:LoKuLBSze19z0U/45DBFt6aEJBs=,iv:Btk0sBgj8h5Qk5eYNwPHULuhPu0nXSXE2iR4UVFcBeA=,tag:S2I9HQkeo/jJboy44vrgCw==,type:comment]
#ENC[AES256_GCM,data:wDZ6Ln5teASPxXPvQGRZCdBIvfY=,iv:Qnx32skeDMB21GwhXd5fImkHS+y+HUOdNvbMT2mpy6A=,tag:BKl04542M8rH6BpFERqHZg==,type:comment]
#ENC[AES256_GCM,data:f+g7qdm8xf/wDhQqlnzIdmHhzfOG73VWfdw=,iv:/kDspwnXH7QfhzUuHATQTniLm/ZX6mo/QGxyQXdubcY=,tag:muoXeMNHb5vqm8IoC6Gl4A==,type:comment]
#ENC[AES256_GCM,data:42kR+DANphdxNVWNlxePU8U=,iv:JeZgMtb7a+/7V5hruQIHio0Aj+ThpHZwajx10e0rqOA=,tag:Ln+7DFl6+aq4YLZ8GK9qOg==,type:comment]
#ENC[AES256_GCM,data:DjK/fZDWEaa2BA==,iv:AnceR62V3OJrn5utgdffMcC+mWdxsUYMYn6454SVCsY=,tag:MRa8cDMEMGtBCxvqcKy/0Q==,type:comment]
#ENC[AES256_GCM,data:jqzidzai+6ShhzM=,iv:PDjUgLaoFVxAWBLXfWkXRzBp5BuvGU7DCorRYY6dan0=,tag:dKa2O7n/jno/M5nzCzCD/w==,type:comment]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age19j24x89dfh4f7v58c8k64yupqas4f7qkkyper7yj9dd7vqwvvq0qkyvhxk
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4U204eXIyaDJFMXIweXp1
NEhoYU5qa3B5Q1VpODNsSEpuT0txRWpuVDM0CmptVHNFQkpWTkJ2M3B4dWpWN0s4
ZjRuc3BhckVLSzFuOGJ3WTB0YnRRRDgKLS0tIHlaSUxITUlGU3VaRWZFbENUTVY2
SWVwUGVxcGJscG5PalphZFVIS1ZjY2MKi4VvrNW1AH+fJaI/rzOltPylSiY1z3nS
ebrYdpyM5KKQ46uezvU4J3Qau/Inv8CkZ72vHlQ6EK2kmmZZLszwJg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1ma8x6wugvc40mkst33mejq0m6r44jk6zwjjun3znyer5nztgn9vs0nwjx4
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAyVHVwMEZjVk8xMTNIekF1
ZFlZbFhvOTJSbVN4ZmorSmFCbkxBUUxOOERJCjBjMkdxQ0V4OXEwdGF2Sno4VTh2
MURQMUhQV083M3lpREFRM2Qza3JLN0kKLS0tIEFoeUVsL3poajljMDEwTCtWcXRD
Y3NHNmVDZFZuNjlUUDdMa3N3ZVNTWkUKeO4sT0ZyTAyrMKj27fbFhQZ+bDMru6Bk
j4Im41l9ClpIVQt8iz61mwKrm+QmBA9r1aL34u3lGQyKBOk4vq/m9A==
-----END AGE ENCRYPTED FILE-----
- recipient: age1s5qwsuc3e4m3c4w5hl6tyja70w273gr60j9j9dcpc6mz69lemg3qpwud3h
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUT3dKNk4rSVZUck5LZ2t1
eUhPSXBURUFGbnU4NUtjMVVpeGI5eVI1SVc4CkdTY25jTy91VFhLS1F3V3ZzM1A4
OGMxWmtWd1lVU3dZcG8xWlRwYkorSU0KLS0tIE12WlFyUWZ0dHYvTEd0N0tPWUt1
bldpMnp5cnpXN2J5MEc5cC9DZktEekUKC6sei7v252fZyW8sd1xuZDjwoJFCKGot
t9f+jUDOx5wGlH53Fd2jCRArKZkQ850sFj79Lh2Rx6wbDj1Ks5XcVA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-12-10T04:12:19Z"
mac: ENC[AES256_GCM,data:AcuCxKGm9xLgn/gnk0XDVtLM5PWQvgGd+qXusuvwCUV4ln1//Lpwpp3TL0mEMdwEcFOdCasW4A10rGpCoBqKsckroiUSEB0G2p0vrD3b3Vmo804JYcKmSZ85InZCXUWenfOTEzx/A1ruqSBSkRYro+NdyZ/+JXQVXnTLCPesgwE=,iv:UPRNsfeUKnml9OFkkqrI0fI4f/RWN2ovTsaItwT8Y0c=,tag:75NEPjeAXUwlCPGbLPhPFg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.1

29
shell.nix Normal file
View File

@@ -0,0 +1,29 @@
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
pkgs = import nixpkgs { config = { }; overlays = [ ]; };
in
pkgs.mkShellNoCC {
packages = with pkgs; [
cowsay
lolcat
bitwarden
bitwarden-cli
sops
];
GREETING = "Hello, Nix!";
shellHook = ''
echo $GREETING | cowsay | lolcat
bw config server https://vault.subsonics.nl
echo "please enter bitwarden email"
read BW_USER
echo "please enter bitwarden password"
read -s BW_PASSWORD
bw login $BW_USER $BW_PASSWORD
BW_SESSION="$(bw unlock $BW_PASSWORD --raw)"
mkdir -p ~/.config/sops/age
bw get attachment keys.txt --itemid ee6a90b0-4120-46f7-a1c6-9648316e43d5 --output ~/.config/sops/age/keys.txt
'';
}

0
shells/.gitkeep Normal file
View File

View File

View File

@@ -0,0 +1,191 @@
# 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, ... }:
{
imports = [
./hardware/hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "drivebystation-nix"; # Define your hostname.
# 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.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8";
};
services = {
displayManager.sddm.enable = false;
displayManager.defaultSession = "gnome";
desktopManager.plasma6.enable = true;
xserver = {
enable = true; # Enable the deprecated X11 teletype terminal connection system.
# Specify first device section to use nvidia GPU
# services.xserver.config = lib.mkForce ''
# Section "ServerLayout"
# Identifier "layout"
# Screen 0 "amdgpu"
# Inactive "nvidia"
# Option "AllowNVIDIAGPUScreens"
# EndSection
# Section "Device"
# Identifier "nvidia"
# Driver "nvidia"
# BusID "PCI:01:0:0"
# EndSection
# Section "Screen"
# Identifier "nvidia"
# Device "nvidia"
# EndSection
# Section "Device"
# Identifier "amdgpu"
# Driver "amdgpu"
# BusID "PCI:50:0:0"
# EndSection
# Section "Screen"
# Identifier "amdgpu"
# Device "amdgpu"
# EndSection
# '';
desktopManager = {
# Disable xterm
xterm.enable = false;
# Enable xfce session
xfce = {
enable = true;
};
# Enable Gnome Session
gnome.enable = true;
# Disable fuckshit plasma
};
# Configure Display Manager
displayManager = {
gdm.enable = true;
# Enable lightdm
lightdm.enable = false;
};
# Configure keymap in X11
xkb = {
layout = "us";
variant = "intl";
};
};
};
# services.xserver.displayManager.defaultSession = "gnome-x11"; # services.xserver.displayManager.autoLogin.enable = true;
# services.xserver.displayManager.autoLogin.user = "andreas";
# systemd.services."getty@tty1".enable = false;
# systemd.services."autovt@tty1".enable = false;
programs.ssh.askPassword = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
# Configure console keymap
console.keyMap = "us-acentos";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
xfce.xfce4-whiskermenu-plugin
gnome-tweaks
qemu
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
24800 #Synergy
];
networking.firewall.allowedUDPPorts = [
24800 #Synergy
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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. Its 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 = "24.05"; # Did you read the comment?
}

View File

@@ -0,0 +1,151 @@
# nixosConfigurations.th0nkpad-nixos = nixpkgs.lib.nixosSystem {
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
# The namespace used for your flake, defaulting to "internal" if not set.
namespace,
# The system architecture for this host (eg. `x86_64-linux`).
system,
# The Snowfall Lib target for this system (eg. `x86_64-iso`).
target,
# A normalized name for the system target (eg. `iso`).
format,
# A boolean to determine whether this system is a virtual target using nixos-generators.
virtual,
# An attribute map of your defined hosts.
systems,
# All other arguments come from the system system.
config
, ...
}:
let
inherit (lib.my-namespace) enabled;
inherit pkgs;
installedPackages = lib.my-namespace.mkPackages pkgs;
in
{
# inherit system;
imports = [
./configuration.nix
./video.nix
];
config = {
system.stateVersion = "24.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Define a user account. Don't forget to set a password with passwd.
users.users.andreas = {
isNormalUser = true;
description = "Andreas Schaafsma";
extraGroups = [ "networkmanager" "wheel" ] ;
packages = with pkgs; [
# Packages from inputs
inputs.game-of-life.packages.x86_64-linux.default
inputs.zen-browser.packages.x86_64-linux.default
inputs.nixos-cosmic
inputs.trilium-next-pr.legacyPackages.x86_64-linux.trilium-next-desktop
# We want flatpak support
flatpak
# GNOME shit
gnome-software
gnomeExtensions.pop-shell
gnome-remote-desktop
soundwireserver
vscode
spotify
appimage-run
minecraft
trilium-desktop
terraform
# thunderbird
];
};
services.gnome.gnome-remote-desktop.enable = true;
my-namespace.cosmic-desktop.enable = false;
# lib.my-namespace.home.stream-tools.enable = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
59010 #SoundWireServer
3389 #RDP
22 #ssh
];
networking.firewall.allowedUDPPorts = [
59010 #SoundWireServer
3389 #RDP
22 #ssh
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Install firefox.
programs.firefox.enable = true;
nixpkgs.config.allowBroken = true;
# Set up system Packages
environment.systemPackages = with pkgs; [
git
wine
# bottles
gparted
ntfs3g
ntfsprogs
synergy
my-namespace.udev-steelseries
my-namespace.hello
# stuff I installed to try to get gamescope to work to no avail Gamescope is just broken it seems.
# pkgs.mesa
# pkgs.vulkan-loader
# pkgs.vulkan-validation-layers
# pkgs.vulkan-extension-layer
# pkgs.vulkan-tools
# pkgs.libva
# pkgs.libva-utils
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
]
++ installedPackages.packages;
programs.nix-ld = {
enable = true;
package = pkgs.nix-ld-rs;
};
services.flatpak.enable = true;
systemd.services.flatpak-repo = {
wantedBy = [ "multi-user.target" ];
path = [ pkgs.flatpak ];
script = ''
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
'';
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
# settings = {
# # passwordAuthentication = true;
# };
};
services.xrdp.enable = true;
# services.xrdp.defaultWindowManager = "${pkgs.gnome-session}/bin/gnome-session";
services.xrdp.defaultWindowManager = "startxfce4";
services.xrdp.openFirewall = true;
services.xrdp.audio.enable = false;
# Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI!
# If no user is logged in, the machine will power down after 20 minutes.
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
};
}

View File

@@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
{
boot.kernelParams = [ "drm.edid_firmware=DP-6:edid/edid.bin" ];
hardware.firmware = [
(
pkgs.runCommand "edid.bin" { } ''
mkdir -p $out/lib/firmware/edid
cp ${./firmware/KG271-edid.bin} $out/lib/firmware/edid/edid.bin
''
)];
}

View File

@@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
let
inherit (lib.my-namespace) enabled;
in
{
my-namespace.hardware = {
graphics-nvidia-prime-amd = enabled;
# graphics-nvidia-prime-amd-testing = enabled;
# graphics-amd-igpu-only = enabled;
};
}

View File

@@ -0,0 +1,126 @@
{ config, lib, pkgs, ... }:
{
# Enable OpenGL
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [ nvidia-vaapi-driver ];
};
# Load nvidia driver for Xorg and Wayland
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11_beta ];
# boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
boot.loader.systemd-boot.consoleMode = "max";
boot.kernelParams = [
"amdgpu.modeset=1"
"nvidia-drm.fbdev=1"
"nvidia-drm.modeset=0"
# "nvidia.NVreg_PreserveVideoMemoryAllocations=0"
"amd_iommu=on"
# "vfio-pci.ids=\"10de:2489,10de:228b\""
# "nomodeset"
# "nvidia_drm.modeset=1"
];
boot.blacklistedKernelModules = [
"i915"
"nouveau"
# "nvidia"
# "nvidia-drm"
# "nvidia-uvm"
# "nvidiafb"
# "nvidia_drm"
# "nvidia_modeset"
];
# boot.extraModprobeConfig = ''
# blacklist nvidia
# blacklist nvidia-drm
# blacklist nvidia_drm
# blacklist nvidia-uvm
# blacklist nvidia_uvm
# blacklist nvidia_modeset
# blacklist nvidiafb
# blacklist nouveau
# options nouveau modeset=0
# '';
boot.extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0
'';
# services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.videoDrivers = [ "amdgpu" "nvidia" ];
# services.udev.extraRules = ''
# # Remove NVIDIA USB xHCI Host Controller devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA USB Type-C UCSI devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA Audio devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA VGA/3D controller devices
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
# '';
boot.initrd.kernelModules = [
"amdgpu"
"nvidia"
# "nvidia-drm"
"nvidiafb"
# "nvidia-uvm"
# "nvidia-modeset"
# "i2c-nvidia_gpu"
];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = 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;
# 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 = false;
# 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.beta;
# package = config.boot.kernelPackages.nvidiaPackages.none;
# package = config.boot.kernelPackages.nvidiaPackages.production;
forceFullCompositionPipeline = false;
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
reverseSync.enable = false;
# Make sure to use the correct Bus ID values for your system!
# intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:01:0:0";
amdgpuBusId = "PCI:50:0:0"; #For AMD GPU
};
};
users.users.andreas = {
extraGroups = [ "video" "render" ];
};
}

View File

@@ -0,0 +1,60 @@
# 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")
./graphics/nvidia-stable.nix
# ./graphics/nvidia.nix
./acer-monitor-edid.nix
];
#boot.kernelPackages = pkgs.linuxPackages_latest;
# boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
boot.kernelPackages = pkgs.linuxPackages;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.kernelModules = [ "kvm-amd" "4vl2loopback" ];
boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
boot.blacklistedKernelModules = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/563805a1-5277-4488-bbdd-c1a7ed37be76";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E846-D998";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
# Try to fix hibernation
# swapDevices = [ ];
swapDevices = [ {
device = "/var/lib/swapfile";
size = 32*1024;
} ]; #resume-offset = 78399488
boot.resumeDevice = "/dev/disk/by-uuid/563805a1-5277-4488-bbdd-c1a7ed37be76"; # the unlocked drive mapping
boot.kernelParams = [
"resume_offset=78399488" #sudo filefrag -v /var/lib/swapfile|awk 'NR==4{gsub(/\./,"");print $4;}'
];
security.protectKernelImage = false;
# 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 po ssible 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.enp72s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
{
boot.kernelModules = [
"v4l2loopback" # Webcam loopback
];
boot.extraModulePackages = [
pkgs.linuxPackages.v4l2loopback # Webcam loopback
];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
'';
environment.systemPackages = with pkgs; [
# Webcam packages
v4l-utils
android-tools
adb-sync
];
}

View File

@@ -15,7 +15,7 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
]; ];
networking.hostName = "drivebystation-nixos-wsl";
# Enable Experimental Features # Enable Experimental Features
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];

View File

@@ -0,0 +1,46 @@
# nixosConfigurations.drivebystation-nixos-wsl = nixpkgs.lib.nixosSystem {
#
# };
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
namespace, # The namespace used for your flake, defaulting to "internal" if not set.
system, # The system architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format, # A normalized name for the system target (eg. `iso`).
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems, # An attribute map of your defined hosts.
# All other arguments come from the system system.
config,
...
}:
{
inherit system;
modules = [
nixos-wsl.nixosModules.default
./configuration.nix
{
system.stateVersion = "24.05";
wsl.enable = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = [
]
++ installedPackages.mkPackages.packages;
programs.nix-ld = {
enable = true;
package = pkgs.nix-ld-rs;
};
}
];
specialArgs = { inherit inputs; };
# Your configuration.
}

View File

@@ -44,29 +44,25 @@
LC_TELEPHONE = "nl_NL.UTF-8"; LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8"; LC_TIME = "nl_NL.UTF-8";
}; };
# Enable the X11 windowing system
# Enable the X11 windowing system.
services.xserver.enable = true; services.xserver.enable = true;
# Enable the GNOME Desktop Environment
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11 # Configure keymap in X11
services.xserver.xkb = { services.xserver.xkb = {
layout = "us"; layout = "us";
variant = "intl"; variant = "intl";
}; };
# Configure console keymap # Configure console keymap
console.keyMap = "us-acentos"; console.keyMap = "us-acentos";
# Enable CUPS to print documents
# Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
# Enable sound with pulse (pipewire)
# Enable sound with pipewire.
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
# Enable realtimekit (pulse requirement)
security.rtkit.enable = true; security.rtkit.enable = true;
# Configure pipewire service
services.pipewire = { services.pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
@@ -106,5 +102,4 @@
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
} }

View File

@@ -0,0 +1,113 @@
# nixosConfigurations.th0nkpad-nixos = nixpkgs.lib.nixosSystem {
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
# The namespace used for your flake, defaulting to "internal" if not set.
namespace,
# The system architecture for this host (eg. `x86_64-linux`).
system,
# The Snowfall Lib target for this system (eg. `x86_64-iso`).
target,
# A normalized name for the system target (eg. `iso`).
format,
# A boolean to determine whether this system is a virtual target using nixos-generators.
virtual,
# An attribute map of your defined hosts.
systems,
# All other arguments come from the system system.
config
, ...
}:
let
inherit pkgs;
installedPackages = lib.my-namespace.mkPackages pkgs;
in
{
# inherit system;
imports = [
./configuration.nix
];
config = {
system.stateVersion = "24.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Define a user account. Don't forget to set a password with passwd.
users.users.andreas = {
isNormalUser = true;
description = "Andreas";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
flatpak
gnome-software
soundwireserver
vscode
spotify
appimage-run
inputs.game-of-life.packages.x86_64-linux.default
inputs.nixos-cosmic
# thunderbird
];
};
# lib.my-namespace.home.stream-tools.enable = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
59010 #SoundWireServer
3389 #RDP
];
networking.firewall.allowedUDPPorts = [
59010 #SoundWireServer
3389 #RDP
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Install firefox.
programs.firefox.enable = true;
# Set up system Packages
environment.systemPackages = with pkgs; [
git
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
]
++ installedPackages.packages;
programs.nix-ld = {
enable = true;
package = pkgs.nix-ld-rs;
};
services.flatpak.enable = true;
systemd.services.flatpak-repo = {
wantedBy = [ "multi-user.target" ];
path = [ pkgs.flatpak ];
script = ''
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
'';
};
services.openssh = {
enable = true;
passwordAuthentication = true;
};
# services.xrdp.enable = true;
# services.xrdp.defaultWindowManager = "${pkgs.gnome-session}/bin/gnome-session";
# services.xrdp.openFirewall = true;
# Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI!
# If no user is logged in, the machine will power down after 20 minutes.
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
};
}