Manually manage Marauder boot and filesystem options

This commit is contained in:
2024-07-12 12:39:06 -07:00
parent 300c82fb87
commit 116c382db5
6 changed files with 112 additions and 155 deletions

19
flake.lock generated
View File

@@ -32,27 +32,10 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1720542800,
"narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "feb2849fdeb70028c70d73b848214b00d324a497",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
"nixpkgs": "nixpkgs"
}
}
},

View File

@@ -10,12 +10,12 @@
nixosConfigurations = {
marauder = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./marauder/configuration.nix ];
modules = [ ./marauder ];
specialArgs = { inherit inputs; };
};
monolith = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./monolith/configuration.nix ];
modules = [ ./monolith ];
specialArgs = { inherit inputs; };
};
};

View File

@@ -1,96 +0,0 @@
{ pkgs, inputs, ... }:
{
imports = [
./backup.nix
./hardware-configuration.nix
inputs.nixos-hardware.nixosModules.asus-rog-strix-g513im
];
networking = {
hostName = "marauder";
networkmanager.enable = true;
};
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
users.users = {
nettika = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
};
};
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
# Chat clients
discord
element-desktop
telegram-desktop
# Browsers
firefox
# Coding
vscode
# Art and 3D
inkscape
openscad-unstable
bambu-studio
# Multimedia
vlc
# Productivity
obsidian
];
programs = {
git = {
enable = true;
lfs.enable = true;
config = {
init.defaultBranch = "master";
user = {
email = "git@nettika.cat";
name = "Nettika";
};
credential.helper = "store";
};
};
nano = {
enable = true;
nanorc = ''
set autoindent
set linenumbers
'';
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
};
services = {
xserver = {
enable = true;
desktopManager = {
cinnamon.enable = true;
xterm.enable = false;
};
};
displayManager.defaultSession = "cinnamon";
};
time.timeZone = "America/Los_Angeles";
system.stateVersion = "24.05";
}

109
marauder/default.nix Normal file
View File

@@ -0,0 +1,109 @@
{ pkgs, inputs, ... }:
{
imports = [
./backup.nix
inputs.nixos-hardware.nixosModules.asus-rog-strix-g513im
];
networking = {
hostName = "marauder";
networkmanager.enable = true;
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/648c6539-892c-40d7-8b07-23fe760df02a";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/1D62-C30E";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
};
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" ];
kernelModules = [ "kvm-amd" ];
};
users.users = {
nettika = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
};
};
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
# Chat clients
discord
element-desktop
telegram-desktop
# Browsers
firefox
# Coding
vscode
# Art and 3D
inkscape
openscad-unstable
bambu-studio
# Multimedia
vlc
# Productivity
obsidian
];
programs.git = {
enable = true;
lfs.enable = true;
config = {
init.defaultBranch = "master";
user = {
email = "git@nettika.cat";
name = "Nettika";
};
credential.helper = "store";
};
};
programs.nano = {
enable = true;
nanorc = ''
set autoindent
set linenumbers
'';
};
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
services.xserver = {
enable = true;
desktopManager = {
cinnamon.enable = true;
xterm.enable = false;
};
displayManager.defaultSession = "cinnamon";
};
time.timeZone = "America/Los_Angeles";
system.stateVersion = "24.05";
}

View File

@@ -1,39 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/648c6539-892c-40d7-8b07-23fe760df02a";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/1D62-C30E";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# 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.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}