tangled
alpha
login
or
join now
nel.pet
/
cyclamen
4
fork
atom
NixOS and Home Manager config
4
fork
atom
overview
issues
pulls
pipelines
feat: very initial nixos config
nel.pet
7 months ago
e0f03ce3
85cfa16c
verified
This commit was signed with the committer's
known signature
.
nel.pet
SSH Key Fingerprint:
SHA256:Zd+mWw4EweOfjYKNMYyVtMSN7oj+SBabmubG4RThVEI=
+124
-1
3 changed files
expand all
collapse all
unified
split
flake.nix
systems
nel-desktop
configuration.nix
hardware-configuration.nix
+6
-1
flake.nix
···
1
1
{
2
2
-
description = "Home Manager configuration of nel";
2
2
+
description = "Nel's flake";
3
3
4
4
inputs = {
5
5
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
···
21
21
inherit pkgs;
22
22
extraSpecialArgs = { inherit inputs; };
23
23
modules = [(import ./modules/home)];
24
24
+
};
25
25
+
26
26
+
nixosConfigurations."nel-desktop" = nixpkgs.lib.nixosSystem {
27
27
+
specialArgs = { inherit inputs; };
28
28
+
modules = [ ./systems/nel-desktop/configuration.nix ];
24
29
};
25
30
};
26
31
}
+75
systems/nel-desktop/configuration.nix
···
1
1
+
{ ... }: {
2
2
+
imports = [
3
3
+
./hardware-configuration.nix
4
4
+
];
5
5
+
6
6
+
# Bootloader.
7
7
+
boot.loader.systemd-boot.enable = true;
8
8
+
boot.loader.efi.canTouchEfiVariables = true;
9
9
+
10
10
+
networking.hostName = "nel-desktop";
11
11
+
networking.networkmanager.enable = true;
12
12
+
13
13
+
nix.settings = {
14
14
+
experimental-features = [ "nix-command" "flakes" ];
15
15
+
use-xdg-base-directories = true;
16
16
+
};
17
17
+
18
18
+
programs.partition-manager.enable = true;
19
19
+
services.flatpak.enable = true;
20
20
+
environment.variables.PAGER = "less -FRX";
21
21
+
programs.ssh.enableAskPassword = true;
22
22
+
23
23
+
# Set your time zone.
24
24
+
time.timeZone = "Europe/Copenhagen";
25
25
+
26
26
+
# Select internationalisation properties.
27
27
+
i18n.defaultLocale = "en_GB.UTF-8";
28
28
+
29
29
+
i18n.extraLocaleSettings = {
30
30
+
LC_ADDRESS = "da_DK.UTF-8";
31
31
+
LC_IDENTIFICATION = "da_DK.UTF-8";
32
32
+
LC_MEASUREMENT = "da_DK.UTF-8";
33
33
+
LC_MONETARY = "da_DK.UTF-8";
34
34
+
LC_NAME = "da_DK.UTF-8";
35
35
+
LC_NUMERIC = "da_DK.UTF-8";
36
36
+
LC_PAPER = "da_DK.UTF-8";
37
37
+
LC_TELEPHONE = "da_DK.UTF-8";
38
38
+
LC_TIME = "da_DK.UTF-8";
39
39
+
};
40
40
+
41
41
+
services.displayManager.sddm.enable = true;
42
42
+
services.desktopManager.plasma6.enable = true;
43
43
+
44
44
+
services.pulseaudio.enable = false;
45
45
+
security.rtkit.enable = true;
46
46
+
services.pipewire = {
47
47
+
enable = true;
48
48
+
alsa.enable = true;
49
49
+
alsa.support32Bit = true;
50
50
+
pulse.enable = true;
51
51
+
};
52
52
+
53
53
+
# Configure console keymap
54
54
+
console.keyMap = "dk-latin1";
55
55
+
56
56
+
# Enable CUPS to print documents.
57
57
+
services.printing.enable = true;
58
58
+
59
59
+
users.users.nel = {
60
60
+
isNormalUser = true;
61
61
+
description = "nel";
62
62
+
extraGroups = [ "networkmanager" "wheel" ];
63
63
+
};
64
64
+
65
65
+
# Allow unfree packages
66
66
+
nixpkgs.config.allowUnfree = true;
67
67
+
68
68
+
# This value determines the NixOS release from which the default
69
69
+
# settings for stateful data, like file locations and database versions
70
70
+
# on your system were taken. It‘s perfectly fine and recommended to leave
71
71
+
# this value at the release version of the first install of this system.
72
72
+
# Before changing this value read the documentation for this option
73
73
+
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
74
74
+
system.stateVersion = "25.05"; # Did you read the comment?
75
75
+
}
+43
systems/nel-desktop/hardware-configuration.nix
···
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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
12
12
+
boot.initrd.kernelModules = [ ];
13
13
+
boot.kernelModules = [ "kvm-amd" ];
14
14
+
boot.extraModulePackages = [ ];
15
15
+
16
16
+
fileSystems."/" =
17
17
+
{ device = "/dev/disk/by-uuid/77d1988d-5ac7-444c-a856-292742191a2f";
18
18
+
fsType = "ext4";
19
19
+
};
20
20
+
21
21
+
fileSystems."/boot" =
22
22
+
{ device = "/dev/disk/by-uuid/62F8-3117";
23
23
+
fsType = "vfat";
24
24
+
options = [ "fmask=0022" "dmask=0022" ];
25
25
+
};
26
26
+
27
27
+
fileSystems."/home" =
28
28
+
{ device = "/dev/disk/by-uuid/4db06561-1474-402e-989f-539e416e2663";
29
29
+
fsType = "ext4";
30
30
+
};
31
31
+
32
32
+
swapDevices = [ ];
33
33
+
34
34
+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
35
35
+
# (the default) this is the recommended approach. When using systemd-networkd it's
36
36
+
# still possible to use this option, but it's recommended to use it in conjunction
37
37
+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
38
38
+
networking.useDHCP = lib.mkDefault true;
39
39
+
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
40
40
+
41
41
+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
42
42
+
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
43
43
+
}