back to nix
This commit is contained in:
parent
6fed8f89f7
commit
091b092b2e
10 changed files with 92 additions and 225 deletions
143
flake.lock
generated
143
flake.lock
generated
|
@ -5,11 +5,11 @@
|
|||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -18,99 +18,29 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"microvm": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688933605,
|
||||
"narHash": "sha256-eux5CjKmO+6GFoovtckoVo0es1FZ2mzupehDyHuCaCk=",
|
||||
"owner": "astro",
|
||||
"repo": "microvm.nix",
|
||||
"rev": "018691bf86a70b7e5d24eb37d6aad05ce1c1b12e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "astro",
|
||||
"ref": "v0.4.0",
|
||||
"repo": "microvm.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
<<<<<<< HEAD
|
||||
"lastModified": 1716633019,
|
||||
"narHash": "sha256-xim1b5/HZYbWaZKyI7cn9TJCM6ewNVZnesRr00mXeS4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9d29cd266cebf80234c98dd0b87256b6be0af44e",
|
||||
=======
|
||||
"lastModified": 1689431009,
|
||||
"narHash": "sha256-hPgQCRWP5q/Xc4qOIP3c2krR9nQua78+t9EDiuey5nc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "af8279f65fe71ce5a448408034a8c06e2b4b2c66",
|
||||
>>>>>>> parent of 5b47cc3 (retire toaster, refactor a bit)
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
<<<<<<< HEAD
|
||||
"ref": "nixos-23.11",
|
||||
=======
|
||||
"ref": "nixos-23.05",
|
||||
>>>>>>> parent of 5b47cc3 (retire toaster, refactor a bit)
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1716655032,
|
||||
"narHash": "sha256-kQ25DAiCGigsNR/Quxm3v+JGXAEXZ8I7RAF4U94bGzE=",
|
||||
"lastModified": 1735531152,
|
||||
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "59a450646ec8ee0397f5fa54a08573e8240eb91f",
|
||||
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1689398528,
|
||||
"narHash": "sha256-qVn/doWn20axR+KvmAAGexv0A5RVzcBbd5HfNMAMeVI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3dc2bc15956db2ff2316af45eefd45803fc1372b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.05",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1689373857,
|
||||
"narHash": "sha256-mtBksyvhhT98Zsm9tYHuMKuLwUKDwv+BGTl6K5nOGhY=",
|
||||
"lastModified": 1735471104,
|
||||
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dfdbcc428f365071f0ca3888f6ec8c25c3792885",
|
||||
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -120,47 +50,11 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks-nix": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"lanzaboote",
|
||||
"flake-compat"
|
||||
],
|
||||
"flake-utils": [
|
||||
"lanzaboote",
|
||||
"flake-utils"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1684842236,
|
||||
"narHash": "sha256-rYWsIXHvNhVQ15RQlBUv67W3YnM+Pd+DuXGMvCBq2IE=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "61e567d6497bc9556f391faebe5e410e6623217f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
>>>>>>> parent of 5b47cc3 (retire toaster, refactor a bit)
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"microvm": "microvm",
|
||||
"nixpkgs": "nixpkgs",
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
>>>>>>> parent of 5b47cc3 (retire toaster, refactor a bit)
|
||||
"sops-nix": "sops-nix",
|
||||
"tmux-yank": "tmux-yank"
|
||||
}
|
||||
|
@ -168,20 +62,15 @@
|
|||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
<<<<<<< HEAD
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
=======
|
||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||
>>>>>>> parent of 5b47cc3 (retire toaster, refactor a bit)
|
||||
"nixpkgs-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716692524,
|
||||
"narHash": "sha256-sALodaA7Zkp/JD6ehgwc0UCBrSBfB4cX66uFGTsqeFU=",
|
||||
"lastModified": 1735468296,
|
||||
"narHash": "sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "962797a8d7f15ed7033031731d0bb77244839960",
|
||||
"rev": "bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
20
flake.nix
20
flake.nix
|
@ -7,7 +7,7 @@
|
|||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
};
|
||||
|
||||
# microvm = {
|
||||
|
@ -27,7 +27,7 @@
|
|||
outputs =
|
||||
inputs@{ self
|
||||
, flake-utils
|
||||
, microvm
|
||||
# , microvm
|
||||
, nixpkgs-stable
|
||||
, nixpkgs-unstable
|
||||
, sops-nix
|
||||
|
@ -55,7 +55,7 @@
|
|||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
# sops-nix.nixosModules.sops
|
||||
# lanzaboote.nixosModules.lanzaboote
|
||||
|
||||
./hosts/toaster
|
||||
|
@ -63,9 +63,9 @@
|
|||
./modules/basic-tools
|
||||
./modules/binary-caches.nix
|
||||
./modules/devtools.nix
|
||||
./modules/sway.nix
|
||||
./modules/gnome.nix
|
||||
./modules/gnupg.nix
|
||||
./modules/mail
|
||||
# ./modules/mail
|
||||
./modules/radio.nix
|
||||
./modules/science.nix
|
||||
./modules/tlp.nix
|
||||
|
@ -146,10 +146,10 @@
|
|||
# };
|
||||
};
|
||||
|
||||
hydraJobs =
|
||||
let
|
||||
get-toplevel = (host: nixSystem: nixSystem.config.microvm.declaredRunner or nixSystem.config.system.build.toplevel);
|
||||
in
|
||||
nixpkgs-stable.lib.mapAttrs get-toplevel self.nixosConfigurations;
|
||||
# hydraJobs =
|
||||
# let
|
||||
# get-toplevel = (host: nixSystem: nixSystem.config.microvm.declaredRunner or nixSystem.config.system.build.toplevel);
|
||||
# in
|
||||
# nixpkgs-stable.lib.mapAttrs get-toplevel self.nixosConfigurations;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
{ pkgs, config, ... }: {
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
hardware.opengl = {
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
amdvlk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
};
|
||||
# hardware.graphics = {
|
||||
# extraPackages = with pkgs; [
|
||||
# rocm-opencl-icd
|
||||
# rocm-opencl-runtime
|
||||
# amdvlk
|
||||
# ];
|
||||
# extraPackages32 = with pkgs; [
|
||||
# driversi686Linux.amdvlk
|
||||
# ];
|
||||
# };
|
||||
}
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
./amd.nix
|
||||
./amd-new-pstate.nix
|
||||
./hardware-configuration.nix
|
||||
./irc.nix
|
||||
# ./irc.nix
|
||||
./stateful-network.nix
|
||||
./network.nix
|
||||
./network-vpns.nix
|
||||
./secrets.nix
|
||||
./secure-boot.nix
|
||||
# ./network.nix
|
||||
# ./network-vpns.nix
|
||||
# ./secrets.nix
|
||||
# ./secure-boot.nix
|
||||
./zfs.nix
|
||||
];
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
supportedLocales = [ "all" ];
|
||||
};
|
||||
|
||||
users.users.grue = {
|
||||
users.users."0xa" = {
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"video"
|
||||
|
@ -41,7 +41,7 @@
|
|||
"libvirtd"
|
||||
];
|
||||
group = "users";
|
||||
home = "/home/grue";
|
||||
home = "/home/0xa";
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
};
|
||||
|
@ -60,6 +60,6 @@
|
|||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
|
|
@ -9,72 +9,45 @@
|
|||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.zfs.extraPools = [ "zpool" ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "toasterpool/nixos/root";
|
||||
{ device = "zpool/root";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{
|
||||
device = "toasterpool/nixos/nix";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
|
||||
fileSystems."/var" =
|
||||
{
|
||||
device = "toasterpool/userdata/var";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib" =
|
||||
{
|
||||
device = "toasterpool/userdata/var/lib";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
|
||||
fileSystems."/var/log" =
|
||||
{
|
||||
device = "toasterpool/userdata/var/log";
|
||||
{ device = "zpool/nix";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{
|
||||
device = "toasterpool/userdata/home";
|
||||
{ device = "zpool/data/home";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/grue" =
|
||||
{
|
||||
device = "toasterpool/userdata/home/grue";
|
||||
fileSystems."/var" =
|
||||
{ device = "zpool/data/var";
|
||||
fsType = "zfs";
|
||||
options = [ "zfsutil" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/7663-6239";
|
||||
{ device = "/dev/disk/by-uuid/A170-F83D";
|
||||
fsType = "vfat";
|
||||
options = [ "X-mount.mkdir" ];
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/dev/disk/by-id/nvme-eui.ace42e002621ff2b2ee4ac0000000001-part2";
|
||||
randomEncryption = true;
|
||||
}
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-partuuid/8a544c8b-1a49-481b-a685-253ef7478b2c";
|
||||
randomEncryption = true;}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
|
@ -82,13 +55,10 @@
|
|||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp5s0f4u1u1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||
networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
# services.fprintd.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.grue.extraGroups = [ "networkmanager" ];
|
||||
users.users."0xa".extraGroups = [ "networkmanager" ];
|
||||
|
||||
networking = {
|
||||
hostName = "toaster";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
{ pkgs, lib, config, ... }: {
|
||||
services.fstrim.enable = true;
|
||||
services.zfs = {
|
||||
autoSnapshot.enable = true;
|
||||
|
@ -10,7 +10,19 @@
|
|||
};
|
||||
networking.hostId = "dca22577";
|
||||
boot = {
|
||||
kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
|
||||
kernelPackages = let
|
||||
zfsCompatibleKernelPackages = lib.filterAttrs (
|
||||
name: kernelPackages:
|
||||
(builtins.match "linux_[0-9]+_[0-9]+" name) != null
|
||||
&& (builtins.tryEval kernelPackages).success
|
||||
&& (!kernelPackages.${config.boot.zfs.package.kernelModuleAttribute}.meta.broken)
|
||||
) pkgs.linuxKernel.packages;
|
||||
latestKernelPackage = lib.last (
|
||||
lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)) (
|
||||
builtins.attrValues zfsCompatibleKernelPackages
|
||||
)
|
||||
);
|
||||
in latestKernelPackage;
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
kernelParams = [ "nohibernate" ];
|
||||
plymouth.enable = false;
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
dino
|
||||
ffmpeg-full
|
||||
firefox-wayland
|
||||
fluffychat
|
||||
gimp
|
||||
inkscape
|
||||
kicad
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
clang_15
|
||||
clang-tools_15
|
||||
direnv
|
||||
(nix-direnv.override { enableFlakes = true; })
|
||||
# (nix-direnv.override { enableFlakes = true; })
|
||||
sops
|
||||
# rust
|
||||
(inputs.fenix.packages."x86_64-linux".stable.toolchain)
|
||||
# (inputs.fenix.packages."x86_64-linux".stable.toolchain)
|
||||
# nix
|
||||
rnix-lsp
|
||||
# rnix-lsp
|
||||
nil
|
||||
nixpkgs-fmt
|
||||
nix-index
|
||||
|
@ -30,7 +30,7 @@
|
|||
enable = true;
|
||||
package = pkgs.wireshark;
|
||||
};
|
||||
users.users.grue.extraGroups = [ "wireshark" ];
|
||||
users.users."0xa".extraGroups = [ "wireshark" ];
|
||||
|
||||
## Julia
|
||||
environment.variables = {
|
||||
|
|
|
@ -8,17 +8,16 @@
|
|||
celluloid
|
||||
gnome-console
|
||||
gnome-obfuscate
|
||||
gnome.gnome-boxes
|
||||
gnome.gnome-tweaks
|
||||
gnome-boxes
|
||||
gnome-tweaks
|
||||
nextcloud-client
|
||||
qbittorrent
|
||||
];
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome.totem
|
||||
gnome.geary
|
||||
gnome.gnome-music
|
||||
gnome-console
|
||||
totem
|
||||
geary
|
||||
gnome-music
|
||||
];
|
||||
|
||||
|
||||
|
@ -30,7 +29,7 @@
|
|||
|
||||
programs = {
|
||||
seahorse.enable = true;
|
||||
gnupg.agent.pinentryFlavor = "gnome3";
|
||||
gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||
evolution = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.evolution-ews ];
|
||||
|
@ -70,7 +69,7 @@
|
|||
programs.zsh.vteIntegration = true;
|
||||
programs.bash.vteIntegration = true;
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
fonts.packages = with pkgs; [
|
||||
monoid
|
||||
font-awesome
|
||||
dejavu_fonts
|
||||
|
@ -87,7 +86,7 @@
|
|||
hack-font
|
||||
liberation_ttf
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
proggyfonts
|
||||
|
@ -98,7 +97,7 @@
|
|||
iosevka-bin
|
||||
];
|
||||
|
||||
fonts.enableDefaultFonts = true;
|
||||
fonts.enableDefaultPackages = true;
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
allowBitmaps = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue