···
1
1
+
{ config, pkgs, ... }:
2
2
+
3
3
+
{
4
4
+
imports =
5
5
+
[ # Include the results of the hardware scan.
6
6
+
./hardware-configuration.nix
7
7
+
# home-manager is now imported via the flake's modules list
8
8
+
];
9
9
+
10
10
+
nix.settings.experimental-features = [ "nix-command" "flakes" ];
11
11
+
12
12
+
# Bootloader.
13
13
+
boot.loader.systemd-boot.enable = true;
14
14
+
boot.loader.efi.canTouchEfiVariables = true;
15
15
+
16
16
+
# Use latest kernel.
17
17
+
boot.kernelPackages = pkgs.linuxPackages_latest;
18
18
+
19
19
+
networking.hostName = "nixos"; # Define your hostname.
20
20
+
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
21
21
+
22
22
+
# Configure network proxy if necessary
23
23
+
# networking.proxy.default = "http://user:password@proxy:port/";
24
24
+
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
25
25
+
26
26
+
# Enable networking
27
27
+
networking.networkmanager.enable = true;
28
28
+
29
29
+
# Set your time zone.
30
30
+
time.timeZone = "America/New_York";
31
31
+
32
32
+
# Select internationalisation properties.
33
33
+
i18n.defaultLocale = "en_US.UTF-8";
34
34
+
35
35
+
i18n.extraLocaleSettings = {
36
36
+
LC_ADDRESS = "en_US.UTF-8";
37
37
+
LC_IDENTIFICATION = "en_US.UTF-8";
38
38
+
LC_MEASUREMENT = "en_US.UTF-8";
39
39
+
LC_MONETARY = "en_US.UTF-8";
40
40
+
LC_NAME = "en_US.UTF-8";
41
41
+
LC_NUMERIC = "en_US.UTF-8";
42
42
+
LC_PAPER = "en_US.UTF-8";
43
43
+
LC_TELEPHONE = "en_US.UTF-8";
44
44
+
LC_TIME = "en_US.UTF-8";
45
45
+
};
46
46
+
47
47
+
# Enable the X11 windowing system.
48
48
+
services.xserver.enable = true;
49
49
+
50
50
+
# Enable the GNOME Desktop Environment.
51
51
+
services.xserver.displayManager.gdm.enable = true;
52
52
+
services.xserver.desktopManager.gnome.enable = true;
53
53
+
54
54
+
# Configure keymap in X11
55
55
+
services.xserver.xkb = {
56
56
+
layout = "us";
57
57
+
variant = "";
58
58
+
};
59
59
+
60
60
+
# Enable CUPS to print documents.
61
61
+
services.printing.enable = true;
62
62
+
63
63
+
# Enable sound with pipewire.
64
64
+
services.pulseaudio.enable = false;
65
65
+
security.rtkit.enable = true;
66
66
+
services.pipewire = {
67
67
+
enable = true;
68
68
+
alsa.enable = true;
69
69
+
alsa.support32Bit = true;
70
70
+
pulse.enable = true;
71
71
+
# If you want to use JACK applications, uncomment this
72
72
+
#jack.enable = true;
73
73
+
74
74
+
# use the example session manager (no others are packaged yet so this is enabled by default,
75
75
+
# no need to redefine it in your config for now)
76
76
+
#media-session.enable = true;
77
77
+
};
78
78
+
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
83
+
users.users.sean = {
84
84
+
isNormalUser = true;
85
85
+
description = "Sean Aye";
86
86
+
extraGroups = [ "networkmanager" "wheel" ];
87
87
+
shell = pkgs.fish;
88
88
+
};
89
89
+
home-manager.users.sean = { pkgs, ...}: {
90
90
+
home.packages = [
91
91
+
pkgs.atool
92
92
+
pkgs.httpie
93
93
+
pkgs.helix
94
94
+
pkgs.jujutsu
95
95
+
];
96
96
+
programs.jujutsu = {
97
97
+
enable = true;
98
98
+
settings = {
99
99
+
user = {
100
100
+
email = "hello@seanaye.ca";
101
101
+
name = "Sean Aye";
102
102
+
};
103
103
+
};
104
104
+
};
105
105
+
home.sessionVariables = {
106
106
+
EDITOR = "hx";
107
107
+
VISUAL = "hx";
108
108
+
SUDO_EDITOR = "hx";
109
109
+
};
110
110
+
programs.home-manager.enable = true;
111
111
+
programs.helix.enable = true;
112
112
+
programs.fish = {
113
113
+
enable = true;
114
114
+
interactiveShellInit = ''
115
115
+
set fish_greeting
116
116
+
'';
117
117
+
};
118
118
+
programs.starship = {
119
119
+
enable = true;
120
120
+
enableFishIntegration = true;
121
121
+
};
122
122
+
123
123
+
124
124
+
home.stateVersion = "25.05";
125
125
+
};
126
126
+
127
127
+
# Install firefox.
128
128
+
programs.firefox.enable = true;
129
129
+
programs.fish.enable = true;
130
130
+
131
131
+
programs._1password.enable = true;
132
132
+
programs._1password-gui = {
133
133
+
enable = true;
134
134
+
polkitPolicyOwners = ["sean"];
135
135
+
};
136
136
+
137
137
+
programs.steam = {
138
138
+
enable = true;
139
139
+
};
140
140
+
141
141
+
142
142
+
# Allow unfree packages
143
143
+
nixpkgs.config.allowUnfree = true;
144
144
+
145
145
+
# List packages installed in system profile. To search, run:
146
146
+
# $ nix search wget
147
147
+
environment.systemPackages = with pkgs; [
148
148
+
git
149
149
+
helix
150
150
+
wl-clipboard
151
151
+
];
152
152
+
environment.variables = {
153
153
+
EDITOR = "hx";
154
154
+
VISUAL = "hx";
155
155
+
SUDO_EDITOR = "hx";
156
156
+
};
157
157
+
158
158
+
159
159
+
# Some programs need SUID wrappers, can be configured further or are
160
160
+
# started in user sessions.
161
161
+
# programs.mtr.enable = true;
162
162
+
# programs.gnupg.agent = {
163
163
+
# enable = true;
164
164
+
# enableSSHSupport = true;
165
165
+
# };
166
166
+
167
167
+
# List services that you want to enable:
168
168
+
169
169
+
# Enable the OpenSSH daemon.
170
170
+
# services.openssh.enable = true;
171
171
+
172
172
+
# Open ports in the firewall.
173
173
+
# networking.firewall.allowedTCPPorts = [ ... ];
174
174
+
# networking.firewall.allowedUDPPorts = [ ... ];
175
175
+
# Or disable the firewall altogether.
176
176
+
# networking.firewall.enable = false;
177
177
+
178
178
+
# This value determines the NixOS release from which the default
179
179
+
# settings for stateful data, like file locations and database versions
180
180
+
# on your system were taken. It‘s perfectly fine and recommended to leave
181
181
+
# this value at the release version of the first install of this system.
182
182
+
# Before changing this value read the documentation for this option
183
183
+
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
184
184
+
system.stateVersion = "25.05"; # Did you read the comment?
185
185
+
186
186
+
}
···
1
1
+
{
2
2
+
"nodes": {
3
3
+
"home-manager": {
4
4
+
"inputs": {
5
5
+
"nixpkgs": [
6
6
+
"nixpkgs"
7
7
+
]
8
8
+
},
9
9
+
"locked": {
10
10
+
"lastModified": 1748665073,
11
11
+
"narHash": "sha256-RMhjnPKWtCoIIHiuR9QKD7xfsKb3agxzMfJY8V9MOew=",
12
12
+
"owner": "nix-community",
13
13
+
"repo": "home-manager",
14
14
+
"rev": "282e1e029cb6ab4811114fc85110613d72771dea",
15
15
+
"type": "github"
16
16
+
},
17
17
+
"original": {
18
18
+
"owner": "nix-community",
19
19
+
"ref": "release-25.05",
20
20
+
"repo": "home-manager",
21
21
+
"type": "github"
22
22
+
}
23
23
+
},
24
24
+
"nixpkgs": {
25
25
+
"locked": {
26
26
+
"lastModified": 1748437600,
27
27
+
"narHash": "sha256-hYKMs3ilp09anGO7xzfGs3JqEgUqFMnZ8GMAqI6/k04=",
28
28
+
"owner": "NixOS",
29
29
+
"repo": "nixpkgs",
30
30
+
"rev": "7282cb574e0607e65224d33be8241eae7cfe0979",
31
31
+
"type": "github"
32
32
+
},
33
33
+
"original": {
34
34
+
"owner": "NixOS",
35
35
+
"ref": "nixos-25.05",
36
36
+
"repo": "nixpkgs",
37
37
+
"type": "github"
38
38
+
}
39
39
+
},
40
40
+
"root": {
41
41
+
"inputs": {
42
42
+
"home-manager": "home-manager",
43
43
+
"nixpkgs": "nixpkgs"
44
44
+
}
45
45
+
}
46
46
+
},
47
47
+
"root": "root",
48
48
+
"version": 7
49
49
+
}
···
1
1
+
{
2
2
+
description = "My NixOS Flake Configuration";
3
3
+
4
4
+
inputs = {
5
5
+
# Nixpkgs (stable or unstable)
6
6
+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; # Or "nixos-24.05" for stable
7
7
+
8
8
+
# Home Manager
9
9
+
home-manager = {
10
10
+
url = "github:nix-community/home-manager/release-25.05";
11
11
+
inputs.nixpkgs.follows = "nixpkgs"; # Ensures Home Manager uses the same nixpkgs
12
12
+
};
13
13
+
};
14
14
+
15
15
+
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
16
16
+
nixosConfigurations = {
17
17
+
# Replace "nixos" with your actual desired hostname if it's different
18
18
+
# This "nixos" must match the `networking.hostName` in your configuration.nix
19
19
+
nixos = nixpkgs.lib.nixosSystem {
20
20
+
system = "x86_64-linux"; # Or your system's architecture
21
21
+
specialArgs = { inherit inputs; }; # Pass inputs to your modules
22
22
+
modules = [
23
23
+
# Your main configuration file
24
24
+
./configuration.nix
25
25
+
26
26
+
# Home Manager module
27
27
+
home-manager.nixosModules.home-manager
28
28
+
];
29
29
+
};
30
30
+
};
31
31
+
};
32
32
+
}
···
1
1
+
# Do not modify this file! It was generated by ‘nixos-generate-config’
2
2
+
# and may be overwritten by future invocations. Please make changes
3
3
+
# to /etc/nixos/configuration.nix instead.
4
4
+
{ config, lib, pkgs, modulesPath, ... }:
5
5
+
6
6
+
{
7
7
+
imports =
8
8
+
[ (modulesPath + "/installer/scan/not-detected.nix")
9
9
+
];
10
10
+
11
11
+
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
12
12
+
boot.initrd.kernelModules = [ ];
13
13
+
boot.kernelModules = [ "kvm-intel" ];
14
14
+
boot.extraModulePackages = [ ];
15
15
+
16
16
+
fileSystems."/" =
17
17
+
{ device = "/dev/disk/by-uuid/e51cb271-90b6-49ae-89aa-491b17e59d97";
18
18
+
fsType = "ext4";
19
19
+
};
20
20
+
21
21
+
fileSystems."/boot" =
22
22
+
{ device = "/dev/disk/by-uuid/0089-74FA";
23
23
+
fsType = "vfat";
24
24
+
options = [ "fmask=0077" "dmask=0077" ];
25
25
+
};
26
26
+
27
27
+
swapDevices = [ ];
28
28
+
29
29
+
hardware.system76.kernel-modules.enable = true;
30
30
+
hardware.system76.enableAll = true;
31
31
+
hardware.graphics = {
32
32
+
enable = true;
33
33
+
enable32Bit = true; # crucial for many steam games
34
34
+
};
35
35
+
36
36
+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
37
37
+
# (the default) this is the recommended approach. When using systemd-networkd it's
38
38
+
# still possible to use this option, but it's recommended to use it in conjunction
39
39
+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
40
40
+
networking.useDHCP = lib.mkDefault true;
41
41
+
# networking.interfaces.enp0s20f0u4u3.useDHCP = lib.mkDefault true;
42
42
+
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
43
43
+
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
44
44
+
45
45
+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
46
46
+
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
47
47
+
}