This commit is contained in:
Vivian 2022-12-12 16:28:54 +01:00
parent 05f6c9cba2
commit 5b2ee8ad66
6 changed files with 244 additions and 135 deletions

View file

@ -24,6 +24,23 @@
"type": "github"
}
},
"all-cabal-json": {
"flake": false,
"locked": {
"lastModified": 1665552503,
"narHash": "sha256-r14RmRSwzv5c+bWKUDaze6pXM7nOsiz1H8nvFHJvufc=",
"owner": "nix-community",
"repo": "all-cabal-json",
"rev": "d7c0434eebffb305071404edcf9d5cd99703878e",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "hackage",
"repo": "all-cabal-json",
"type": "github"
}
},
"beautysh": {
"inputs": {
"nixpkgs": [
@ -113,11 +130,11 @@
"crane": {
"flake": false,
"locked": {
"lastModified": 1661875961,
"narHash": "sha256-f1h/2c6Teeu1ofAHWzrS8TwBPcnN+EEu+z1sRVmMQTk=",
"lastModified": 1670284777,
"narHash": "sha256-JF0pc0s4z/X+Iy+lNHOwUQ8I5bz+q7uX4HrKTNIEj24=",
"owner": "ipetkov",
"repo": "crane",
"rev": "d9f394e4e20e97c2a60c3ad82c2b6ef99be19e24",
"rev": "2243fb9c872de25cb564a02d324ea6a5b9853052",
"type": "github"
},
"original": {
@ -129,11 +146,11 @@
"devshell": {
"flake": false,
"locked": {
"lastModified": 1653917170,
"narHash": "sha256-FyxOnEE/V4PNEcMU62ikY4FfYPo349MOhMM97HS0XEo=",
"lastModified": 1663445644,
"narHash": "sha256-+xVlcK60x7VY1vRJbNUEAHi17ZuoQxAIH4S4iUFUGBA=",
"owner": "numtide",
"repo": "devshell",
"rev": "fc7a3e3adde9bbcab68af6d1e3c6eb738e296a92",
"rev": "e3dc3e21594fe07bdb24bdf1c8657acaa4cb8f66",
"type": "github"
},
"original": {
@ -145,11 +162,15 @@
"dream2nix": {
"inputs": {
"alejandra": "alejandra",
"all-cabal-json": "all-cabal-json",
"crane": "crane",
"devshell": "devshell",
"flake-parts": "flake-parts",
"flake-utils-pre-commit": "flake-utils-pre-commit",
"ghc-utils": "ghc-utils",
"gomod2nix": "gomod2nix",
"mach-nix": "mach-nix",
"nix-pypi-fetcher": "nix-pypi-fetcher",
"nixpkgs": [
"webcord",
"nixpkgs"
@ -158,11 +179,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1664882193,
"narHash": "sha256-uiAYOxN/M4dpaB6ieY3xOvOH6XgHP9NVXDTzSRa3pMc=",
"lastModified": 1670715183,
"narHash": "sha256-l3OhVCCimrN1HFPfqfKAyzuMuPxNXZYLsI9w7AaQXv8=",
"owner": "nix-community",
"repo": "dream2nix",
"rev": "785b76894263fd76a0e69955e4cd990b7b735bdf",
"rev": "3d6f13ef9d4cb8c41bc83383bbec3e74865ef90d",
"type": "github"
},
"original": {
@ -264,6 +285,24 @@
"type": "indirect"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1668450977,
"narHash": "sha256-cfLhMhnvXn6x1vPm+Jow3RiFAUSCw/l1utktCw5rVA4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "d591857e9d7dd9ddbfba0ea02b43b927c3c0f1fa",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1659877975,
@ -354,6 +393,22 @@
"type": "github"
}
},
"ghc-utils": {
"flake": false,
"locked": {
"lastModified": 1662774800,
"narHash": "sha256-1Rd2eohGUw/s1tfvkepeYpg8kCEXiIot0RijapUjAkE=",
"ref": "refs/heads/master",
"rev": "bb3a2d3dc52ff0253fb9c2812bd7aa2da03e0fea",
"revCount": 1072,
"type": "git",
"url": "https://gitlab.haskell.org/bgamari/ghc-utils"
},
"original": {
"type": "git",
"url": "https://gitlab.haskell.org/bgamari/ghc-utils"
}
},
"gomod2nix": {
"flake": false,
"locked": {
@ -399,11 +454,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1670709556,
"narHash": "sha256-ws/Nfl0v0z4mqbaZcKeWY0jNq3O14vthVmAK2f12TfY=",
"lastModified": 1670857002,
"narHash": "sha256-Tck24Ys4PGZL2ClFp7gvB648eBYPTiycPrTX9QeEXyk=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "6381b6474fb6973bfe83526e21bcee08e5e45ecc",
"rev": "111d209bff5448c3a55e07f344cf89715536bba4",
"type": "github"
},
"original": {
@ -415,11 +470,11 @@
"hyprland-protocols": {
"flake": false,
"locked": {
"lastModified": 1670258048,
"narHash": "sha256-Lm2sXnDVZNE+taHqsqVibvPmSdu65VHvXI507KVX4lg=",
"lastModified": 1670703428,
"narHash": "sha256-4KUW5SKR0Y9uaYGcYwy53YJ3B/sgiprCL4fRGO+mpOA=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "0dcff94fc10df2bbb66d3e1b5a1d6cfd3ada5515",
"rev": "d0d6db8cb5bef6d93ca3ad8fb2124964173396da",
"type": "github"
},
"original": {
@ -626,6 +681,22 @@
"type": "github"
}
},
"nix-pypi-fetcher": {
"flake": false,
"locked": {
"lastModified": 1669065297,
"narHash": "sha256-UStjXjNIuIm7SzMOWvuYWIHBkPUKQ8Id63BMJjnIDoA=",
"owner": "DavHau",
"repo": "nix-pypi-fetcher",
"rev": "a9885ac6a091576b5195d547ac743d45a2a615ac",
"type": "github"
},
"original": {
"owner": "DavHau",
"repo": "nix-pypi-fetcher",
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1636849918,
@ -709,13 +780,31 @@
"type": "indirect"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1665349835,
"narHash": "sha256-UK4urM3iN80UXQ7EaOappDzcisYIuEURFRoGQ/yPkug=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "34c5293a71ffdb2fe054eb5288adc1882c1eb0b1",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1670597555,
"narHash": "sha256-/k939P2S2246G6K5fyvC0U2IWvULhb4ZJg9K7ZxsX+k=",
"lastModified": 1670856062,
"narHash": "sha256-p6+eBkjUWiXSFP80EOgrJX97fK1OQ+3np750nEHaELw=",
"owner": "NULLx76",
"repo": "nixpkgs",
"rev": "2dea0f4c2d6e4603f54b2c56c22367e77869490c",
"rev": "0f482d4d0d5e2c8d244ade8bfadf99e9c8ad9e29",
"type": "github"
},
"original": {
@ -742,15 +831,16 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1664876616,
"narHash": "sha256-OxZntLnFgKbGUrPJJNLMxxj4yUaN/30+LG9N81ADqZE=",
"lastModified": 1670507980,
"narHash": "sha256-riNZa0xzM1it3pzxciwALeMs+0CsBMWIW2FqulzK8vM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0490b307e5556a8804e710d0c744d29c80fbce48",
"rev": "2787fc7d1e51404678614bf0fe92fc296746eec0",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -765,11 +855,11 @@
"nmdSrc": "nmdSrc"
},
"locked": {
"lastModified": 1670519577,
"narHash": "sha256-unss17EdnkL3Y3a9Rg3qAyY13TP7FDDTgAP/8pr+SbA=",
"lastModified": 1670787591,
"narHash": "sha256-qPpCNKfWB+Dd3kgKUj4RjIjJg6O3Y2DhYDl4UhThl90=",
"owner": "pta2002",
"repo": "nixvim",
"rev": "a7fbb812242d1223fcca8c0a270eb87a82f98f17",
"rev": "db8a2c0b97cbbfbdb43b0e6909f38f83d1600e4e",
"type": "github"
},
"original": {
@ -796,11 +886,11 @@
},
"nur": {
"locked": {
"lastModified": 1670733021,
"narHash": "sha256-HQwU8r6hVM2fvI2i7yNP5/lISs+V5XrxtUiMLkCeuAM=",
"lastModified": 1670819416,
"narHash": "sha256-ja1livEv48Y3piLmdKo0T+1cUHdSfmaHXOxOxJNbneA=",
"owner": "nix-community",
"repo": "NUR",
"rev": "a7194d7569f7cb5a63d34d205cdd8fa2f3225537",
"rev": "068395203bcc46e2ed19843f508383982b153271",
"type": "github"
},
"original": {
@ -839,16 +929,16 @@
"poetry2nix_2": {
"flake": false,
"locked": {
"lastModified": 1632969109,
"narHash": "sha256-jPDclkkiAy5m2gGLBlKgH+lQtbF7tL4XxBrbSzw+Ioc=",
"lastModified": 1666918719,
"narHash": "sha256-BkK42fjAku+2WgCOv2/1NrPa754eQPV7gPBmoKQBWlc=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "aee8f04296c39d88155e05d25cfc59dfdd41cc77",
"rev": "289efb187123656a116b915206e66852f038720e",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "1.21.0",
"ref": "1.36.0",
"repo": "poetry2nix",
"type": "github"
}
@ -1059,11 +1149,11 @@
]
},
"locked": {
"lastModified": 1655914948,
"narHash": "sha256-9/NrBoUoVXUSVl6wnbEqrtgs1Yr1Bl/j0WYz7ANZ9tk=",
"lastModified": 1670854711,
"narHash": "sha256-bZzuX0r5xVzthPueKuCMHbIFni30eVxS6JOwYuJMkoI=",
"owner": "serokell",
"repo": "vault-secrets",
"rev": "4b8608e48c6748382fa32131d69c2f01a48874ed",
"rev": "f901160d11a41bc9930f8e1ad9ce7bcafd8a4eed",
"type": "github"
},
"original": {
@ -1079,11 +1169,11 @@
"webcord": "webcord_2"
},
"locked": {
"lastModified": 1666097086,
"narHash": "sha256-6WKh4NwItcz9IGY5rGkkeWCtGOmpU3nf85dX29suDjE=",
"lastModified": 1670858114,
"narHash": "sha256-3FTK6wmNlxkXPjG06XVyelccV5j4sSbUoMRFTZDUfU0=",
"owner": "fufexan",
"repo": "webcord-flake",
"rev": "9098504f2a08ac848ea43de40496925c450e7111",
"rev": "e846ea3cebd7e2363294d3e9265a27f1aff24d29",
"type": "github"
},
"original": {
@ -1095,11 +1185,11 @@
"webcord_2": {
"flake": false,
"locked": {
"lastModified": 1664742535,
"narHash": "sha256-QoXBlhCM97haNlkbU4O2oXITnzrkiM9hYAiNpduVjIQ=",
"lastModified": 1670537029,
"narHash": "sha256-3mNPsMfj1MFNgb7PP8SCuFvSshRxZECMDCUjduRHdXY=",
"owner": "SpacingBat3",
"repo": "WebCord",
"rev": "cb6938bde4f57b252b167b23fc0c2d6120326fff",
"rev": "12fc5e38d0b03f7b63378ee9111abc40c7aee55d",
"type": "github"
},
"original": {
@ -1135,11 +1225,11 @@
]
},
"locked": {
"lastModified": 1670593043,
"narHash": "sha256-tsDs6FB+7PlBOt46dMQFBMH5yPY/fduf4cYbQYhauhA=",
"lastModified": 1670797151,
"narHash": "sha256-ZFzJHqSXhGCjSeMgqTyJG1KJ2Nlwa+NEN9K4oGhWcjg=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "5f7eecff553d82f21e049d79d8fb3f1f46568da0",
"rev": "36ffb6892e14b9c5be6e321b3c47fe286ac256e6",
"type": "github"
},
"original": {

View file

@ -18,6 +18,6 @@
];
# Make me admin
extraGroups = [ "systemd-journal" "wheel" "networkmanager" ];
extraGroups = [ "systemd-journal" "wheel" "networkmanager" "libvirtd" ];
};
}

View file

@ -4,35 +4,37 @@
{ config, pkgs, inputs, ... }: {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-z
./hardware.nix
./networking.nix
./desktop-env.nix
];
# Bootloader.
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi";
};
kernel.sysctl = { "fs.inotify.max_user_watches" = 524288; };
initrd.kernelModules = [ "amdgpu" ];
initrd = {
kernelModules = [ "amdgpu" ];
systemd.enable = true;
verbose = false;
};
resumeDevice = "/dev/nvme0n1p2";
};
fileSystems."/".options = [ "compress=zstd" ];
boot.kernelPackages = pkgs.linuxPackages_latest;
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
@ -45,61 +47,18 @@
LC_TIME = "nl_NL.UTF-8";
};
hardware.opengl.driSupport = true;
hardware.opengl.extraPackages = with pkgs; [
amdvlk
rocm-opencl-icd
rocm-opencl-runtime
];
systemd.tmpfiles.rules =
[ "L+ /opt/rocm/hip - - - - ${pkgs.hip}" ];
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ];
services.xserver.excludePackages = [ pkgs.xterm ];
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
environment.gnome.excludePackages =
(with pkgs; [ gnome-photos gnome-tour gnome-connections ])
++ (with pkgs.gnome; [
atomix # puzzle game
epiphany # web browser
geary # email reader
gedit # text editor
gnome-calendar
gnome-clocks
gnome-contacts
gnome-maps
gnome-music
gnome-notes
gnome-terminal
gnome-weather
hitori # sudoku game
iagno # go game
simple-scan # document scanner
tali # poker game
totem # video player
]);
programs.dconf.enable = true;
services.udisks2.enable = true;
services.dbus.enable = true;
services.fstrim.enable = true;
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "altgr-intl";
xkbOptions = "caps:swapescape";
};
# Enable CUPS to print documents.
services.printing.enable = true;
environment.systemPackages = with pkgs; [ wireguard-tools ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.victor = import ./home;
extraSpecialArgs = { inherit inputs; };
};
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
@ -117,29 +76,14 @@
#media-session.enable = true;
};
environment.systemPackages = with pkgs; [
gnome.gnome-tweaks
gnome.gnome-boxes
wireguard-tools
];
networking.firewall.checkReversePath = false;
# Define a user account. Don't forget to set a password with passwd.
users.users.victor = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
virtualisation = {
podman.enable = true;
libvirtd = {
enable = true;
qemu.package = pkgs.qemu_kvm;
};
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.victor = import ./home;
extraSpecialArgs = { inherit inputs; };
};
virtualisation.podman.enable = true;
fonts.fonts = with pkgs; [
material-design-icons
noto-fonts
@ -152,16 +96,6 @@
})
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# networking.firewall.enable = false;
powerManagement = {
enable = true;
powertop.enable = true;
};
programs.steam = {
enable = true;
# Open ports in the firewall for Steam Remote Play

View file

@ -0,0 +1,51 @@
{ pkgs, ... }: {
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ];
services.xserver.excludePackages = [ pkgs.xterm ];
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "altgr-intl";
xkbOptions = "caps:swapescape";
};
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
environment.gnome.excludePackages =
(with pkgs; [ gnome-photos gnome-tour gnome-connections ])
++ (with pkgs.gnome; [
atomix # puzzle game
epiphany # web browser
geary # email reader
gedit # text editor
gnome-calendar
gnome-clocks
gnome-contacts
gnome-maps
gnome-music
gnome-notes
gnome-terminal
gnome-weather
hitori # sudoku game
iagno # go game
simple-scan # document scanner
tali # poker game
totem # video player
]);
# Services required for gnome
programs.dconf.enable = true;
services.dbus.enable = true;
services.udisks2.enable = true;
# Extra gnome packages
environment.systemPackages = with pkgs; [
gnome.gnome-tweaks
gnome.gnome-boxes
];
}

View file

@ -0,0 +1,29 @@
{ pkgs, ... }: {
hardware.enableAllFirmware = true;
hardware.bluetooth.enable = true;
services.hardware.bolt.enable = true;
# Vulkan
hardware.opengl.driSupport = true;
hardware.opengl.extraPackages = with pkgs; [
amdvlk
rocm-opencl-icd
rocm-opencl-runtime
];
systemd.tmpfiles.rules =
[ "L+ /opt/rocm/hip - - - - ${pkgs.hip}" ];
# SSD Trim
services.fstrim.enable = true;
# Power Management
services.upower.enable = true;
services.thermald.enable = true;
powerManagement = {
enable = true;
powertop.enable = true;
};
}

View file

@ -0,0 +1,5 @@
{ ... }: {
networking.networkmanager.enable = true;
networking.firewall.checkReversePath = false;
# networking.firewall.enable = false;
}