Skip to content

Commit 7b20213

Browse files
committed
feat(nixos): 🚧 initial commit
1 parent 15927e5 commit 7b20213

File tree

181 files changed

+5039
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+5039
-0
lines changed

.direnv/bin/nix-direnv-reload

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
if [[ ! -d "/home/bryn/Source/nixos-configuration-nouveau" ]]; then
4+
echo "Cannot find source directory; Did you move it?"
5+
echo "(Looking for "/home/bryn/Source/nixos-configuration-nouveau")"
6+
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again'
7+
exit 1
8+
fi
9+
10+
# rebuild the cache forcefully
11+
_nix_direnv_force_reload=1 direnv exec "/home/bryn/Source/nixos-configuration-nouveau" true
12+
13+
# Update the mtime for .envrc.
14+
# This will cause direnv to reload again - but without re-building.
15+
touch "/home/bryn/Source/nixos-configuration-nouveau/.envrc"
16+
17+
# Also update the timestamp of whatever profile_rc we have.
18+
# This makes sure that we know we are up to date.
19+
touch -r "/home/bryn/Source/nixos-configuration-nouveau/.envrc" "/home/bryn/Source/nixos-configuration-nouveau/.direnv"/*.rc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/27rg15w6bjjh2hkbdqajhvqd7b02v5cb-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/3a2lv078jq041p12bsfk4w3pa3x9akgw-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/8kpx53qi52yhjai1vdw8zpa95iqa61bv-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/aqnklsijb47x7z816nci9zqg8rjv0wnb-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/bx85qdybd5xh24ldkbc19k2d2hk8fdvb-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/d0c2gch04ipjiclz9ld1yhks2491q0wi-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/g5v3sgqy6a0fsmas7mnapc196flrplix-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/lds3yhj6p900cnzzykrjfyyiqmn4g69c-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/n3cgg42fsasah7hkq1836jl3l80aiwz4-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/r23rzbazfnjihlr2s6cn7b65s2ahrs0g-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/r8nhgnkxacbnf4kv8kdi8b6ks3k9b16i-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/r9lkv1kj3fd57xcgxjrsbps3afg9xn54-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/vm4qsaala00i8q5js7i3am3w0m766k1d-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/yj1wxm9hh8610iyzqnz75kvs6xl8j3my-source
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/zqvb23zss4fgngx4nlkla4ijg6049xch-nixos-env

.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc

+1,993
Large diffs are not rendered by default.

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.justfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# See flake.nix and ./parts/just-flake.nix (just-flake)
2+
import 'just-flake.just'
3+
4+
# Displays this list
5+
default:
6+
@just --list --unsorted

.pre-commit-config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/ssslimpz1lbb8g828z2yxd3s3m7470k4-pre-commit-config.json

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Soaffine
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{flake, ...}: let
2+
username = flake.config.people.myself;
3+
in {
4+
home = {
5+
stateVersion = "24.05";
6+
inherit username;
7+
homeDirectory = "/home/${username}";
8+
sessionVariables = {
9+
};
10+
};
11+
}

environments/desktop/default.nix

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{flake, ...}: let
2+
inherit (flake) inputs;
3+
inherit (inputs) self;
4+
in {
5+
imports = [
6+
self.homeModules.base
7+
self.homeModules.commandline
8+
self.homeModules.extra
9+
self.homeModules.graphical
10+
self.homeModules.internet
11+
self.homeModules.media
12+
self.homeModules.programming
13+
self.homeModules.security-tools
14+
./configuration.nix
15+
];
16+
}

flake.nix

+224
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,224 @@
1+
{
2+
description = "Affine Typed NixOS";
3+
4+
inputs = {
5+
# attic = {
6+
# url = "https://flakehub.com/f/zhaofengli/attic/*.tar.gz";
7+
# inputs.nixpkgs.follows = "nixpkgs";
8+
# };
9+
10+
# colmena-flake = {
11+
# url = "github:juspay/colmena-flake";
12+
# };
13+
14+
# disko = {
15+
# url = "https://flakehub.com/f/nix-community/disko/1.6.0.tar.gz";
16+
# inputs.nixpkgs.url = "nixpkgs";
17+
# };
18+
19+
# dream2nix = {
20+
# url = "github:nix-community/dream2nix";
21+
# inputs.nixpkgs.follows = "nixpkgs";
22+
# };
23+
24+
# fh = {
25+
# url = "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz";
26+
# inputs.nixpkgs.follows = "nixpkgs";
27+
# };
28+
29+
flake-parts = {
30+
url = "github:hercules-ci/flake-parts";
31+
};
32+
33+
# flake-programs-sqlite = {
34+
# url = "github:wamserma/flake-programs-sqlite";
35+
# inputs.nixpkgs.follows = "nixpkgs";
36+
# };
37+
38+
flake-schemas = {
39+
url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";
40+
};
41+
42+
home-manager.follows = "home-manager-unstable";
43+
44+
# home-manager-stable = {
45+
# url = "https://flakehub.com/f/nix-community/home-manager/*.tar.gz";
46+
# inputs.nixpkgs.follows = "nixos-stable";
47+
# };
48+
49+
home-manager-unstable = {
50+
url = "github:nix-community/home-manager";
51+
inputs.nixpkgs.follows = "nixos-unstable";
52+
};
53+
54+
# impermanence = {
55+
# url = "github:nix-community/impermanence";
56+
# inputs.nixpkgs.follows = "nixpkgs";
57+
# };
58+
59+
### Impermanence alternative?
60+
# instransience = {
61+
# url = "github:anna328p/intransience";
62+
# };
63+
64+
just-flake = {
65+
url = "github:juspay/just-flake";
66+
};
67+
68+
# lanzaboote = {
69+
# url = "https://flakehub.com/f/nix-community/lanzaboote/0.3.0.tar.gz";
70+
# inputs.nixpkgs.follows = "nixpkgs";
71+
# };
72+
73+
# nh = {
74+
# url = "github:viperML/nh";
75+
# inputs.nixpkgs.follows = "nixpkgs";
76+
# };
77+
78+
# nixci = {
79+
# url = "github:srid/nixci";
80+
# };
81+
82+
# nix-darwin = {
83+
# url = "github:lnl7/nix-darwin";
84+
# inputs.nixpkgs.follows = "nixpkgs";
85+
# };
86+
87+
# nix-index-database = {
88+
# url = "github:nix-community/nix-index-database";
89+
# inputs.nixpkgs.follows = "nixpkgs";
90+
# };
91+
92+
# nix-vscode-extensions = {
93+
# url = "github:nix-community/nix-vscode-extensions";
94+
# inputs.nixpkgs.follows = "nixpkgs";
95+
# };
96+
97+
nixos-flake = {
98+
url = "github:srid/nixos-flake";
99+
};
100+
101+
# nixos-2311 = {
102+
# url = "github:nixos/nixpkgs/nixos-23.11";
103+
# };
104+
105+
# # nixos-hardware = {
106+
# # url = "github:nixos/nixos-hardware";
107+
# # };
108+
109+
# nixos-stable = {
110+
# url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
111+
# };
112+
113+
nixos-unstable = {
114+
url = "github:NixOS/nixpkgs/nixos-unstable";
115+
};
116+
117+
# nixos-vscode-server = {
118+
# url = "github:nix-community/nixos-vscode-server";
119+
# inputs.nixpkgs.follows = "nixpkgs";
120+
# };
121+
122+
# nixos-wsl = {
123+
# url = "github:nix-community/NixOS-WSL";
124+
# inputs.nixpkgs.follows = "nixpkgs";
125+
# };
126+
127+
nixpkgs.follows = "nixos-unstable";
128+
129+
# nixpkgs-weekly = {
130+
# url = "https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/*.tar.gz";
131+
# };
132+
133+
# nixvim = {
134+
# url = "github:nix-community/nixvim";
135+
# inputs.nixpkgs.follows = "nixpkgs";
136+
# };
137+
138+
# nuenv = {
139+
# url = "https://flakehub.com/f/DeterminateSystems/nuenv/*.tar.gz";
140+
# inputs.nixpkgs.follows = "nixpkgs";
141+
# };
142+
143+
pre-commit-hooks-nix = {
144+
url = "github:cachix/pre-commit-hooks.nix";
145+
inputs.nixpkgs.follows = "nixpkgs";
146+
# inputs.nixpkgs-stable.follows = "nixos-stable";
147+
};
148+
149+
# process-compose-flake = {
150+
# url = "github:Platonic-Systems/process-compose-flake";
151+
# };
152+
153+
# services-flake = {
154+
# url = "github:juspay/services-flake";
155+
# };
156+
157+
# sops-nix = {
158+
# url = "github:Mic92/sops-nix";
159+
# };
160+
161+
# srvos = {
162+
# url = "github:nix-community/srvos";
163+
# inputs.nixpkgs.follows = "nixpkgs";
164+
# };
165+
166+
systems = {
167+
url = "github:nix-systems/default";
168+
};
169+
170+
treefmt-nix = {
171+
url = "github:numtide/treefmt-nix";
172+
inputs.nixpkgs.follows = "nixpkgs";
173+
};
174+
175+
# vaultModule = {
176+
# url = "github:DeterminateSystems/nixos-vault-service/main";
177+
# inputs.nixpkgs.follows = "nixpkgs";
178+
# };
179+
};
180+
181+
nixConfig = {
182+
commit-lockfile-summary = "build(inputs): ⬆️ bump flake.lock";
183+
extra-substituters = ["https://sofia.cachix.org"];
184+
extra-trusted-public-keys = ["sofia.cachix.org-1:xqwE0S1tPcsqfoayNUC0YdsDpj47LQ3Q+YTdDI1WwtE="];
185+
};
186+
187+
outputs = inputs:
188+
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
189+
systems = import inputs.systems;
190+
imports = [
191+
inputs.just-flake.flakeModule
192+
inputs.nixos-flake.flakeModule
193+
inputs.pre-commit-hooks-nix.flakeModule
194+
inputs.treefmt-nix.flakeModule
195+
./home
196+
./nixos
197+
./parts
198+
./users
199+
];
200+
201+
flake = {
202+
nixosConfigurations.desktop =
203+
inputs.self.nixos-flake.lib.mkLinuxSystem
204+
./systems/desktop;
205+
206+
schemas = inputs.flake-schemas.schemas;
207+
};
208+
209+
perSystem = {
210+
config,
211+
self,
212+
system,
213+
...
214+
}: {
215+
legacyPackages.homeConfigurations.desktop =
216+
inputs.self.nixos-flake.lib.mkHomeConfiguration
217+
(import inputs.nixpkgs {
218+
inherit system;
219+
config.allowUnfree = true;
220+
})
221+
./environments/desktop;
222+
};
223+
};
224+
}

home/alacritty.nix

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
programs = {
3+
alacritty = {
4+
enable = true;
5+
settings = {
6+
font = {
7+
normal = {
8+
family = "JetBrains Mono";
9+
style = "Regular";
10+
};
11+
bold = {
12+
style = "Bold";
13+
};
14+
italic = {
15+
style = "Italic";
16+
};
17+
};
18+
window = {
19+
opacity = 0.8;
20+
};
21+
};
22+
};
23+
};
24+
}

home/apple-music.nix

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
lib,
3+
pkgs,
4+
...
5+
}:
6+
lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
7+
home.packages = [pkgs.cider];
8+
}

home/aria2.nix

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_: {
2+
programs = {
3+
aria2 = {
4+
enable = true;
5+
extraConfig = "";
6+
settings = {};
7+
};
8+
};
9+
}

0 commit comments

Comments
 (0)