tangled
alpha
login
or
join now
jordanreger.com
/
nix-config
0
fork
atom
My NixOS configuration (WORK IN PROGRESS; probably unusable)
nix
nixos
config
0
fork
atom
overview
issues
pulls
pipelines
successful refactoring???
jordanreger.com
3 months ago
b514c3dd
41cdbac0
+328
-48
13 changed files
expand all
collapse all
unified
split
flake.lock
flake.nix
home.nix
hosts
mini
configuration.nix
default.nix
modules
home
default.nix
nixos
default.nix
niri.nix
overlays.nix
users
jordan
default.nix
home.nix
settings
default.nix
git.nix
+111
-3
flake.lock
···
7
7
]
8
8
},
9
9
"locked": {
10
10
-
"lastModified": 1758463745,
11
11
-
"narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
10
10
+
"lastModified": 1763992789,
11
11
+
"narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=",
12
12
"owner": "nix-community",
13
13
"repo": "home-manager",
14
14
-
"rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
14
14
+
"rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3",
15
15
"type": "github"
16
16
},
17
17
"original": {
···
21
21
"type": "github"
22
22
}
23
23
},
24
24
+
"niri": {
25
25
+
"inputs": {
26
26
+
"niri-stable": "niri-stable",
27
27
+
"niri-unstable": "niri-unstable",
28
28
+
"nixpkgs": [
29
29
+
"nixpkgs"
30
30
+
],
31
31
+
"nixpkgs-stable": "nixpkgs-stable",
32
32
+
"xwayland-satellite-stable": "xwayland-satellite-stable",
33
33
+
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
34
34
+
},
35
35
+
"locked": {
36
36
+
"lastModified": 1764008093,
37
37
+
"narHash": "sha256-8OmHLuPkZMjjEkn/TA2tk/3tEOE+zoUYiP5YFk7JsrU=",
38
38
+
"owner": "sodiboo",
39
39
+
"repo": "niri-flake",
40
40
+
"rev": "340b81b5d7cb4f15bf23f9ae8e372366c06fd423",
41
41
+
"type": "github"
42
42
+
},
43
43
+
"original": {
44
44
+
"owner": "sodiboo",
45
45
+
"repo": "niri-flake",
46
46
+
"type": "github"
47
47
+
}
48
48
+
},
49
49
+
"niri-stable": {
50
50
+
"flake": false,
51
51
+
"locked": {
52
52
+
"lastModified": 1756556321,
53
53
+
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
54
54
+
"owner": "YaLTeR",
55
55
+
"repo": "niri",
56
56
+
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
57
57
+
"type": "github"
58
58
+
},
59
59
+
"original": {
60
60
+
"owner": "YaLTeR",
61
61
+
"ref": "v25.08",
62
62
+
"repo": "niri",
63
63
+
"type": "github"
64
64
+
}
65
65
+
},
66
66
+
"niri-unstable": {
67
67
+
"flake": false,
68
68
+
"locked": {
69
69
+
"lastModified": 1763990232,
70
70
+
"narHash": "sha256-RdtlZ+nufSwEgNsF0yuTOO2eGpn87Qm9b3tRQPsibH4=",
71
71
+
"owner": "YaLTeR",
72
72
+
"repo": "niri",
73
73
+
"rev": "45b45ac29d654c0e6759ab996c69dfde40053536",
74
74
+
"type": "github"
75
75
+
},
76
76
+
"original": {
77
77
+
"owner": "YaLTeR",
78
78
+
"repo": "niri",
79
79
+
"type": "github"
80
80
+
}
81
81
+
},
24
82
"nixpkgs": {
25
83
"locked": {
26
84
"lastModified": 1763622513,
···
37
95
"type": "github"
38
96
}
39
97
},
98
98
+
"nixpkgs-stable": {
99
99
+
"locked": {
100
100
+
"lastModified": 1763948260,
101
101
+
"narHash": "sha256-dY9qLD0H0zOUgU3vWacPY6Qc421BeQAfm8kBuBtPVE0=",
102
102
+
"owner": "NixOS",
103
103
+
"repo": "nixpkgs",
104
104
+
"rev": "1c8ba8d3f7634acac4a2094eef7c32ad9106532c",
105
105
+
"type": "github"
106
106
+
},
107
107
+
"original": {
108
108
+
"owner": "NixOS",
109
109
+
"ref": "nixos-25.05",
110
110
+
"repo": "nixpkgs",
111
111
+
"type": "github"
112
112
+
}
113
113
+
},
40
114
"root": {
41
115
"inputs": {
42
116
"home-manager": "home-manager",
117
117
+
"niri": "niri",
43
118
"nixpkgs": "nixpkgs"
119
119
+
}
120
120
+
},
121
121
+
"xwayland-satellite-stable": {
122
122
+
"flake": false,
123
123
+
"locked": {
124
124
+
"lastModified": 1755491097,
125
125
+
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
126
126
+
"owner": "Supreeeme",
127
127
+
"repo": "xwayland-satellite",
128
128
+
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
129
129
+
"type": "github"
130
130
+
},
131
131
+
"original": {
132
132
+
"owner": "Supreeeme",
133
133
+
"ref": "v0.7",
134
134
+
"repo": "xwayland-satellite",
135
135
+
"type": "github"
136
136
+
}
137
137
+
},
138
138
+
"xwayland-satellite-unstable": {
139
139
+
"flake": false,
140
140
+
"locked": {
141
141
+
"lastModified": 1763704521,
142
142
+
"narHash": "sha256-ceYEV6PnvUN8Zixao4gpPuN+VT3B0SlAXKuPNHZhqUY=",
143
143
+
"owner": "Supreeeme",
144
144
+
"repo": "xwayland-satellite",
145
145
+
"rev": "f379ff5722a821212eb59ada9cf8e51cb3654aad",
146
146
+
"type": "github"
147
147
+
},
148
148
+
"original": {
149
149
+
"owner": "Supreeeme",
150
150
+
"repo": "xwayland-satellite",
151
151
+
"type": "github"
44
152
}
45
153
}
46
154
},
+38
-11
flake.nix
···
8
8
url = "github:nix-community/home-manager/release-25.05";
9
9
inputs.nixpkgs.follows = "nixpkgs";
10
10
};
11
11
+
12
12
+
niri = {
13
13
+
url = "github:sodiboo/niri-flake";
14
14
+
inputs.nixpkgs.follows = "nixpkgs";
15
15
+
};
11
16
};
12
17
13
18
outputs = {
14
19
self,
15
20
nixpkgs,
16
21
home-manager,
22
22
+
niri,
17
23
...
18
18
-
}@inputs: {
19
19
-
nixosConfigurations.mini = nixpkgs.lib.nixosSystem {
20
20
-
modules = [
21
21
-
# default configuration for now
22
22
-
./hosts/mini/configuration.nix
24
24
+
} @ inputs: let
25
25
+
lib = nixpkgs.lib;
23
26
24
24
-
home-manager.nixosModules.home-manager {
25
25
-
home-manager.useGlobalPkgs = true;
26
26
-
home-manager.useUserPackages = true;
27
27
+
supportedSystems = ["x86_64-linux"];
28
28
+
forAllSystems = func:
29
29
+
lib.genAttrs supportedSystems (
30
30
+
system: func nixpkgs.legacyPackages.${system}
31
31
+
);
27
32
28
28
-
home-manager.users.jordan = import ./home.nix;
29
29
-
}
30
30
-
];
33
33
+
createSystem = {
34
34
+
host,
35
35
+
user,
36
36
+
}:
37
37
+
lib.nixosSystem {
38
38
+
specialArgs = { inherit (inputs) self; };
39
39
+
modules = [
40
40
+
./hosts/${host}
41
41
+
./users/${user}
42
42
+
home-manager.nixosModules.home-manager
43
43
+
niri.nixosModules.niri
44
44
+
{
45
45
+
home-manager.useGlobalPkgs = true;
46
46
+
home-manager.useUserPackages = true;
47
47
+
home-manager.extraSpecialArgs = { inherit (inputs) self; };
48
48
+
home-manager.users.${user} = import ./users/${user}/home.nix;
49
49
+
}
50
50
+
];
51
51
+
};
52
52
+
in {
53
53
+
nixosConfigurations = {
54
54
+
mini = createSystem {
55
55
+
host = "mini";
56
56
+
user = "jordan";
57
57
+
};
31
58
};
32
59
};
33
60
}
+4
home.nix
···
17
17
swaybg
18
18
];
19
19
20
20
+
programs.niri = {
21
21
+
enable = true;
22
22
+
};
23
23
+
20
24
programs.alacritty.enable = true;
21
25
programs.fuzzel.enable = true;
22
26
programs.swaylock.enable = true;
+4
-34
hosts/mini/configuration.nix
···
1
1
-
# Edit this configuration file to define what should be installed on
2
2
-
# your system. Help is available in the configuration.nix(5) man page
3
3
-
# and in the NixOS manual (accessible by running ‘nixos-help’).
4
4
-
5
1
{ config, pkgs, ... }:
6
2
7
3
{
8
8
-
imports =
9
9
-
[ # Include the results of the hardware scan.
10
10
-
./hardware-configuration.nix
11
11
-
];
4
4
+
imports = [
5
5
+
./hardware-configuration.nix
6
6
+
];
12
7
13
13
-
# Bootloader.
14
8
boot.loader.systemd-boot.enable = true;
15
9
boot.loader.efi.canTouchEfiVariables = true;
16
10
17
17
-
networking.hostName = "mini"; # Define your hostname.
18
18
-
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
19
19
-
20
20
-
# Configure network proxy if necessary
21
21
-
# networking.proxy.default = "http://user:password@proxy:port/";
22
22
-
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
11
11
+
networking.hostName = "mini";
23
12
24
24
-
# Enable networking
25
13
networking.networkmanager.enable = true;
26
14
27
27
-
# Set your time zone.
28
15
time.timeZone = "America/New_York";
29
16
30
30
-
# Select internationalisation properties.
31
17
i18n.defaultLocale = "en_US.UTF-8";
32
18
33
19
i18n.extraLocaleSettings = {
···
42
28
LC_TIME = "en_US.UTF-8";
43
29
};
44
30
45
45
-
# Enable the X11 windowing system.
46
46
-
#services.xserver.enable = true;
47
47
-
48
48
-
# Enable the GNOME Desktop Environment.
49
49
-
# services.xserver.displayManager.gdm.enable = true;
50
50
-
# services.xserver.desktopManager.gnome.enable = true;
51
51
-
52
52
-
programs.niri.enable = true;
53
53
-
54
54
-
# Configure keymap in X11
55
31
services.xserver.xkb = {
56
32
layout = "us";
57
33
variant = "";
58
34
};
59
35
60
60
-
# Enable CUPS to print documents.
61
36
services.printing.enable = true;
62
37
63
63
-
# Enable sound with pipewire.
64
38
services.pulseaudio.enable = false;
65
39
security.rtkit.enable = true;
66
40
services.pipewire = {
···
76
50
#media-session.enable = true;
77
51
};
78
52
79
79
-
# Enable touchpad support (enabled default in most desktopManager).
80
80
-
# services.xserver.libinput.enable = true;
81
81
-
82
82
-
# Define a user account. Don't forget to set a password with ‘passwd’.
83
53
users.users.jordan = {
84
54
isNormalUser = true;
85
55
description = "Jordan Reger";
+17
hosts/mini/default.nix
···
1
1
+
{ config, pkgs, ... }:
2
2
+
3
3
+
{
4
4
+
imports = [
5
5
+
./hardware-configuration.nix
6
6
+
../../modules/nixos
7
7
+
];
8
8
+
9
9
+
boot.loader.systemd-boot.enable = true;
10
10
+
boot.loader.efi.canTouchEfiVariables = true;
11
11
+
12
12
+
networking.hostName = "mini";
13
13
+
14
14
+
networking.networkmanager.enable = true;
15
15
+
16
16
+
system.stateVersion = "25.05";
17
17
+
}
+17
modules/home/default.nix
···
1
1
+
{pkgs, ...}: {
2
2
+
home = {
3
3
+
packages = with pkgs; [
4
4
+
file
5
5
+
tree
6
6
+
which
7
7
+
zstd
8
8
+
nixd
9
9
+
nil
10
10
+
btop
11
11
+
alacritty
12
12
+
];
13
13
+
stateVersion = "25.05";
14
14
+
};
15
15
+
16
16
+
programs.home-manager.enable = true;
17
17
+
}
+75
modules/nixos/default.nix
···
1
1
+
{
2
2
+
self,
3
3
+
pkgs,
4
4
+
lib,
5
5
+
...
6
6
+
}: {
7
7
+
nix.gc = {
8
8
+
automatic = true;
9
9
+
dates = lib.mkDefault "weekly";
10
10
+
options = lib.mkDefault "--delete-older-than 7d";
11
11
+
};
12
12
+
13
13
+
nixpkgs.config = {
14
14
+
allowUnfree = true;
15
15
+
};
16
16
+
17
17
+
time.timeZone = "America/New_York";
18
18
+
i18n = {
19
19
+
defaultLocale = "en_US.UTF-8";
20
20
+
extraLocaleSettings = {
21
21
+
LC_ADDRESS = "en_US.UTF-8";
22
22
+
LC_IDENTIFICATION = "en_US.UTF-8";
23
23
+
LC_MEASUREMENT = "en_US.UTF-8";
24
24
+
LC_MONETARY = "en_US.UTF-8";
25
25
+
LC_NAME = "en_US.UTF-8";
26
26
+
LC_NUMERIC = "en_US.UTF-8";
27
27
+
LC_PAPER = "en_US.UTF-8";
28
28
+
LC_TELEPHONE = "en_US.UTF-8";
29
29
+
LC_TIME = "en_US.UTF-8";
30
30
+
};
31
31
+
};
32
32
+
33
33
+
security.polkit.enable = true;
34
34
+
35
35
+
services = {
36
36
+
xserver.xkb = {
37
37
+
layout = "us";
38
38
+
variant = "";
39
39
+
};
40
40
+
41
41
+
printing.enable = true;
42
42
+
43
43
+
openssh = {
44
44
+
enable = true;
45
45
+
settings = {
46
46
+
X11Forwarding = true;
47
47
+
PermitRootLogin = "no";
48
48
+
PasswordAuthentication = false;
49
49
+
};
50
50
+
};
51
51
+
52
52
+
pulseaudio.enable = false;
53
53
+
pipewire = {
54
54
+
enable = true;
55
55
+
alsa.enable = true;
56
56
+
alsa.support32Bit = true;
57
57
+
pulse.enable = true;
58
58
+
jack.enable = true;
59
59
+
};
60
60
+
};
61
61
+
62
62
+
programs.dconf.enable = true;
63
63
+
64
64
+
environment = {
65
65
+
systemPackages = with pkgs; [
66
66
+
helix
67
67
+
wget
68
68
+
curl
69
69
+
git
70
70
+
zip
71
71
+
unzip
72
72
+
];
73
73
+
variables.EDITOR = "hx";
74
74
+
};
75
75
+
}
+29
modules/nixos/niri.nix
···
1
1
+
{pkgs, ...}: {
2
2
+
programs.niri = {
3
3
+
enable = true;
4
4
+
package = pkgs.niri;
5
5
+
}
6
6
+
7
7
+
environment.systemPackages = with pkgs; [
8
8
+
nautilus
9
9
+
nautilus-nautilus-open-any-terminal
10
10
+
];
11
11
+
12
12
+
xdg.portal = {
13
13
+
extraPortals = with pkgs; [
14
14
+
xdg-desktop-portal-gnome
15
15
+
xdg-desktop-portal-gtk
16
16
+
gnome-keyring
17
17
+
];
18
18
+
19
19
+
config = {
20
20
+
niri = {
21
21
+
default = ["gnome" "gtk"];
22
22
+
23
23
+
"org.freedesktop.impl.portal.Access" = ["gtk"];
24
24
+
"org.freedesktop.impl.portal.Notification" = ["gtk"];
25
25
+
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
26
26
+
};
27
27
+
};
28
28
+
};
29
29
+
}
+5
modules/nixos/overlays.nix
···
1
1
+
{self, pkgs, ...}: {
2
2
+
nixpkgs.overlays = [
3
3
+
self.inputs.niri.overlays.niri
4
4
+
];
5
5
+
}
+7
users/jordan/default.nix
···
1
1
+
{...}: {
2
2
+
users.users.jordan = {
3
3
+
isNormalUser = true;
4
4
+
description = "Jordan Reger";
5
5
+
extraGroups = ["networkmanager" "wheel"];
6
6
+
};
7
7
+
}
+10
users/jordan/home.nix
···
1
1
+
{...}: {
2
2
+
imports = [
3
3
+
../../modules/home
4
4
+
5
5
+
./settings
6
6
+
];
7
7
+
8
8
+
home.username = "jordan";
9
9
+
home.homeDirectory = "/home/jordan";
10
10
+
}
+5
users/jordan/settings/default.nix
···
1
1
+
{...}: {
2
2
+
imports = [
3
3
+
./git.nix
4
4
+
];
5
5
+
}
+6
users/jordan/settings/git.nix
···
1
1
+
{...}: {
2
2
+
programs.git = {
3
3
+
userName = "Jordan Reger";
4
4
+
userEmail = "jordan@reger.co";
5
5
+
};
6
6
+
}