updates and some reorganizing

This commit is contained in:
mjallen18
2024-07-23 14:06:20 -05:00
parent 6104df2c69
commit 4b4b419873
7 changed files with 243 additions and 184 deletions

161
flake.lock generated
View File

@@ -11,11 +11,11 @@
"yafas": "yafas"
},
"locked": {
"lastModified": 1721134628,
"narHash": "sha256-hUYnfPwlDfrmAHNdzRBaXeEnxpfAKYyyfJo3AFie5u8=",
"lastModified": 1721744192,
"narHash": "sha256-YKBxgcO5YkkLIxIuLXtrf0El1651hD09xc2iU1LENEc=",
"owner": "chaotic-cx",
"repo": "nyx",
"rev": "7eeff58148cf73cbe7d56120e244f354537f0e56",
"rev": "cbed04d217033816e864b9cda08b20bbfe772ecf",
"type": "github"
},
"original": {
@@ -39,6 +39,26 @@
"url": "https://flakehub.com/f/chaotic-cx/nix-empty-flake/%3D0.1.2.tar.gz"
}
},
"cosmic": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1721160462,
"narHash": "sha256-/VxDWswjySr3CUuMRP4OBBP3sFSps7r1Bh/AJkZSdVk=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "b2d62f3b793495c1156cba6a99512cd95ac2c439",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"crane": {
"inputs": {
"nixpkgs": [
@@ -102,6 +122,22 @@
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@@ -117,7 +153,7 @@
"type": "github"
}
},
"flake-compat_2": {
"flake-compat_3": {
"locked": {
"lastModified": 1688025799,
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
@@ -215,11 +251,11 @@
]
},
"locked": {
"lastModified": 1720734513,
"narHash": "sha256-neWQ8eNtLTd+YMesb7WjKl1SVCbDyCm46LUgP/g/hdo=",
"lastModified": 1721714663,
"narHash": "sha256-ZDW5+rlROxaOuoEfIQM7Gqhoa+WALEYdYIiZhyJjAu0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "90ae324e2c56af10f20549ab72014804a3064c7f",
"rev": "7560dc942a6fbd37ebd1310b3dbda513de2d4b82",
"type": "github"
},
"original": {
@@ -256,11 +292,11 @@
]
},
"locked": {
"lastModified": 1721135958,
"narHash": "sha256-H548rpPMsn25LDKn1PCFmPxmWlClJJGnvdzImHkqjuY=",
"lastModified": 1721714663,
"narHash": "sha256-ZDW5+rlROxaOuoEfIQM7Gqhoa+WALEYdYIiZhyJjAu0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "afd2021bedff2de92dfce0e257a3d03ae65c603d",
"rev": "7560dc942a6fbd37ebd1310b3dbda513de2d4b82",
"type": "github"
},
"original": {
@@ -293,11 +329,11 @@
]
},
"locked": {
"lastModified": 1720697445,
"narHash": "sha256-IvFFc57vljkR1eP4VeNMuXJTS/POClq+ytFAadigSY0=",
"lastModified": 1721226562,
"narHash": "sha256-KfdwusX12hhkzXKBmu2HhaU9EhaxVeWLDQw1Ll2A03o=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "bba994424596df09228f5437bcf8ef7fde1fe56e",
"rev": "927eea31915468e06b94bedf678261dc7cf048c8",
"type": "github"
},
"original": {
@@ -309,7 +345,7 @@
"lanzaboote": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"nixpkgs": [
@@ -378,14 +414,14 @@
},
"nix-darwin": {
"inputs": {
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1721270582,
"narHash": "sha256-MdZmYPPExntE5rJu88IhJSy8Um4UyZCTXhOwvzbjDVI=",
"lastModified": 1721719500,
"narHash": "sha256-nnkqjv4Y37Hydjh6HE9wW4kSkV5Q7q4iIXlL5lwUFOw=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "a3e4a7b8ffc08c7dc1973822a77ad432e1ec3dec",
"rev": "884f3fe6d9bf056ba0017c132c39c1f0d07d4fec",
"type": "github"
},
"original": {
@@ -394,21 +430,6 @@
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1711997375,
"narHash": "sha256-KvU4gOtuFMS9Il67glRGtdNfguAINT9pCaXtvCL8uI8=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "45bf66f7068db79b552da864c0e87452be624d6c",
"type": "github"
},
"original": {
"owner": "gmodena",
"repo": "nix-flatpak",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
@@ -435,7 +456,7 @@
"nix-inspect": {
"inputs": {
"nci": "nci",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"parts": "parts_2"
},
"locked": {
@@ -454,8 +475,8 @@
},
"nixos-apple-silicon": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_4",
"flake-compat": "flake-compat_3",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay_3"
},
"locked": {
@@ -474,11 +495,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1720737798,
"narHash": "sha256-G/OtEAts7ZUvW5lrGMXSb8HqRp2Jr9I7reBuvCOL54w=",
"lastModified": 1721413321,
"narHash": "sha256-0GdiQScDceUrVGbxYpV819LHesK3szHOhJ09e6sgES4=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "c5013aa7ce2c7ec90acee5d965d950c8348db751",
"rev": "ab165a8a6cd12781d76fe9cbccb9e975d0fb634f",
"type": "github"
},
"original": {
@@ -490,11 +511,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"lastModified": 1721562059,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
"type": "github"
},
"original": {
@@ -505,6 +526,22 @@
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1720954236,
"narHash": "sha256-1mEKHp4m9brvfQ0rjCca8P1WHpymK3TOr3v34ydv9bs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "53e81e790209e41f0c1efa9ff26ff2fd7ab35e27",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1710695816,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
@@ -520,13 +557,13 @@
"type": "github"
}
},
"nixpkgs-stable_2": {
"nixpkgs-stable_3": {
"locked": {
"lastModified": 1721226092,
"narHash": "sha256-UBvzVpo5sXSi2S/Av+t+Q+C2mhMIw/LBEZR+d6NMjws=",
"lastModified": 1721548954,
"narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c716603a63aca44f39bef1986c13402167450e0a",
"rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a",
"type": "github"
},
"original": {
@@ -538,11 +575,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1721138476,
"narHash": "sha256-+W5eZOhhemLQxelojLxETfbFbc19NWawsXBlapYpqIA=",
"lastModified": 1721562059,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad0b5eed1b6031efaed382844806550c3dcb4206",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
"type": "github"
},
"original": {
@@ -553,6 +590,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1718149104,
"narHash": "sha256-Ds1QpobBX2yoUDx9ZruqVGJ/uQPgcXoYuobBguyKEh8=",
@@ -566,7 +619,7 @@
"type": "indirect"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1709961763,
"narHash": "sha256-6H95HGJHhEZtyYA3rIQpvamMKAGoa8Yh2rFV29QnuGw=",
@@ -582,7 +635,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1716293225,
"narHash": "sha256-pU9ViBVE3XYb70xZx+jK6SEVphvt7xMTbm6yDIF4xPs=",
@@ -652,7 +705,7 @@
"lanzaboote",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1717664902,
@@ -712,16 +765,16 @@
"root": {
"inputs": {
"chaotic": "chaotic",
"cosmic": "cosmic",
"home-manager": "home-manager_2",
"home-manager-stable": "home-manager-stable",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"nix-darwin": "nix-darwin",
"nix-flatpak": "nix-flatpak",
"nix-inspect": "nix-inspect",
"nixos-apple-silicon": "nixos-apple-silicon",
"nixos-hardware": "nixos-hardware",
"nixpkgs-stable": "nixpkgs-stable_2",
"nixpkgs-stable": "nixpkgs-stable_3",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},

View File

@@ -12,9 +12,6 @@
# Chaotic-nix
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
# Flatpak
nix-flatpak.url = "github:gmodena/nix-flatpak";
# Impermenance
impermanence.url = "github:nix-community/impermanence";
@@ -38,6 +35,7 @@
nixos-apple-silicon.url = "github:mjallen18/nixos-apple-silicon";
nix-darwin.url = "github:LnL7/nix-darwin";
cosmic.url = "github:lilyinstarlight/nixos-cosmic";
};
outputs =
@@ -48,13 +46,13 @@
chaotic,
lanzaboote,
impermanence,
nix-flatpak,
home-manager,
nixos-hardware,
nix-darwin,
nixos-apple-silicon,
home-manager-stable,
nix-inspect,
cosmic,
}@inputs:
let
inherit (self) outputs;
@@ -72,7 +70,6 @@
modules = [
impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote
nix-flatpak.nixosModules.nix-flatpak
./hosts/desktop/configuration.nix
./share/impermanence
chaotic.nixosModules.default
@@ -87,6 +84,8 @@
nixos-hardware.nixosModules.common-gpu-amd
nixos-hardware.nixosModules.common-hidpi
nixos-hardware.nixosModules.common-pc
cosmic.nixosModules.default
];
};

40
hosts/desktop/boot.nix Normal file
View File

@@ -0,0 +1,40 @@
{ config, lib, outputs, pkgs, ... }:
{
# Configure bootloader with lanzaboot and secureboot
boot = {
loader = {
systemd-boot = {
enable = false;
configurationLimit = 2;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
settings = {
default = "@saved";
console-mode = "max";
};
configurationLimit = 5;
};
# Override kernel to latest
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = [
"quiet"
# needed cause ssd powersaving is broken af I guess
"nvme_core.default_ps_max_latency_us=0"
"pcie_aspm=off"
];
consoleLogLevel = 3;
bootspec.enable = true;
};
}

View File

@@ -15,6 +15,7 @@ let
hostname = "matt-nixos";
gnome = false;
plasma = true;
cosmic = false;
resetNetworkScript = pkgs.writeScriptBin "reset-network" ''
#!/usr/bin/env bash
@@ -33,6 +34,8 @@ in
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./boot.nix
./filesystems.nix
# ../../cachix/cachix.nix
../default.nix
];
@@ -46,44 +49,6 @@ in
apps.discover-wrapped.enable = plasma;
# Configure bootloader with lanzaboot and secureboot
boot = {
loader = {
systemd-boot = {
enable = false;
configurationLimit = 2;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
settings = {
default = "@saved";
console-mode = "max";
};
configurationLimit = 5;
};
# Override kernel to latest
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = [
"quiet"
# needed cause ssd powersaving is broken af I guess
"nvme_core.default_ps_max_latency_us=0"
"pcie_aspm=off"
];
consoleLogLevel = 3;
bootspec.enable = true;
};
# Services configs
services = {
# Enable the X11 windowing system.
@@ -102,11 +67,14 @@ in
displayManager = {
sddm.enable = plasma;
sddm.wayland.enable = plasma;
defaultSession = if plasma then "plasma" else "gnome";
# defaultSession = if plasma then "plasma" else "gnome";
};
desktopManager.plasma6.enable = plasma;
desktopManager.cosmic.enable = cosmic;
displayManager.cosmic-greeter.enable = cosmic;
# enable auto discovery of printers
avahi = {
enable = true;
@@ -117,17 +85,32 @@ in
# Enable Flatpak
flatpak.enable = true;
flatpak.packages = [
"com.discordapp.Discord"
"com.spotify.Client"
"com.visualstudio.code"
"it.mijorus.gearlever"
"org.libreoffice.LibreOffice"
"net.davidotek.pupgui2" # Proton-Up Qt
"io.github.prateekmedia.appimagepool"
"org.freedesktop.Piper"
"com.usebottles.bottles"
];
borgbackup.jobs.home-matt = {
encryption.mode = "repokey";
encryption.passCommand = "cat /root/borg";
environment.BORG_RSH = "ssh -i /home/matt/.ssh/id_ed25519";
repo = "/media/nas/backup/desktop-nix/borg/home";
compression = "auto,zstd";
inhibitsSleep = true;
paths = "/home/matt";
exclude = [
"/home/matt/Games"
"/home/matt/1TB"
];
};
btrfs = {
autoScrub.enable = true;
autoScrub.fileSystems = [
"/nix"
"/root"
"/etc"
"/var/log"
"/home"
];
};
ratbagd.enable = true;
};
systemd.services = {
@@ -224,80 +207,6 @@ in
shell = pkgs.zsh;
};
services = {
borgbackup.jobs.home-matt = {
encryption.mode = "repokey";
encryption.passCommand = "cat /root/borg";
environment.BORG_RSH = "ssh -i /home/matt/.ssh/id_ed25519";
repo = "/media/nas/backup/desktop-nix/borg/home";
compression = "auto,zstd";
inhibitsSleep = true;
paths = "/home/matt";
exclude = [
"/home/matt/Games"
"/home/matt/1TB"
];
};
btrfs = {
autoScrub.enable = true;
autoScrub.fileSystems = [
"/nix"
"/root"
"/etc"
"/var/log"
"/home"
];
};
ratbagd.enable = true;
};
fileSystems."/media/nas/backup" = {
device = "//10.0.1.18/Backup";
fsType = "cifs";
options = [
"sec=none"
"x-systemd.automount"
"auto"
"rw"
"file_mode=0775"
"dir_mode=0775"
"uid=matt"
"gid=wheel"
];
};
fileSystems."/media/nas/isos" = {
device = "//10.0.1.18/isos";
fsType = "cifs";
options = [
"sec=none"
"x-systemd.automount"
"auto"
"rw"
"file_mode=0775"
"dir_mode=0775"
"uid=matt"
"gid=wheel"
];
};
fileSystems."/media/nas/3d_printer" = {
device = "//10.0.1.18/3d_printer";
fsType = "cifs";
options = [
"sec=none"
"x-systemd.automount"
"auto"
"rw"
"file_mode=0775"
"dir_mode=0775"
"uid=matt"
"gid=wheel"
];
};
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#

View File

@@ -0,0 +1,47 @@
{ config, lib, outputs, pkgs, ... }:
{
fileSystems."/media/nas/backup" = {
device = "//10.0.1.18/Backup";
fsType = "cifs";
options = [
"sec=none"
"x-systemd.automount"
"auto"
"rw"
"file_mode=0775"
"dir_mode=0775"
"uid=matt"
"gid=wheel"
];
};
fileSystems."/media/nas/isos" = {
device = "//10.0.1.18/isos";
fsType = "cifs";
options = [
"sec=none"
"x-systemd.automount"
"auto"
"rw"
"file_mode=0775"
"dir_mode=0775"
"uid=matt"
"gid=wheel"
];
};
fileSystems."/media/nas/3d_printer" = {
device = "//10.0.1.18/3d_printer";
fsType = "cifs";
options = [
"sec=none"
"x-systemd.automount"
"auto"
"rw"
"file_mode=0775"
"dir_mode=0775"
"uid=matt"
"gid=wheel"
];
};
}

View File

@@ -56,7 +56,9 @@
home.packages = with pkgs; [
# gamescope # using chaotic git version
# gamescope-wsi # using chaotic git version
bottles
deadnix
discord
fastfetch
firefox
freerdp
@@ -69,6 +71,7 @@
# gnomeExtensions.tiling-assistant
goverlay
heroic
libreoffice-qt6-fresh
lm_sensors
lutris
mangohud
@@ -77,15 +80,19 @@
nixfmt-rfc-style
orca-slicer
papirus-icon-theme
piper
pop-gtk-theme
protonup
protontricks
protonvpn-gui
protonvpn-gui
python3
spotify
tree
virt-manager
vmware-horizon-client
vorta
vscode
];
dconf = {

View File

@@ -15,7 +15,11 @@ in
virtualisation.oci-containers.containers."${cfg.name}" = {
autoStart = cfg.autoStart;
image = cfg.image;
cmd = cfg.cmd;
cmd = [
"redis-server"
"--requirepass"
"BogieDudie1"
];
ports = [
"6379:6379"
];