shrug
This commit is contained in:
parent
19232d6f1d
commit
1a3cdb757d
15 changed files with 189 additions and 103 deletions
|
|
@ -15,6 +15,7 @@
|
||||||
flake-utils = { url = "github:numtide/flake-utils"; };
|
flake-utils = { url = "github:numtide/flake-utils"; };
|
||||||
import-tree = { url = "github:vic/import-tree"; };
|
import-tree = { url = "github:vic/import-tree"; };
|
||||||
wrapper-modules = { url = "github:BirdeeHub/nix-wrapper-modules";};
|
wrapper-modules = { url = "github:BirdeeHub/nix-wrapper-modules";};
|
||||||
|
den = { url = "github:vic/den/v0.17.0"; };
|
||||||
|
|
||||||
# Secrets management - https://github.com/Mic92/sops-nix
|
# Secrets management - https://github.com/Mic92/sops-nix
|
||||||
#sops-nix = { url = "github:Mic92/sops-nix"; };
|
#sops-nix = { url = "github:Mic92/sops-nix"; };
|
||||||
|
|
@ -39,6 +40,10 @@
|
||||||
niri = { # - https://github.com/sodiboo/niri-flake/
|
niri = { # - https://github.com/sodiboo/niri-flake/
|
||||||
url = "github:sodiboo/niri-flake";
|
url = "github:sodiboo/niri-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
#inputs.niri-unstable.follows = "";
|
||||||
|
#inputs.niri-stable.follows = "";
|
||||||
|
#inputs.xwayland-satellite-unstable.follows = "";
|
||||||
|
#inputs.xwayland-satellite-stable.follows = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Hassle free desktop shell - https://docs.noctalia.dev/getting-started/nixos/
|
# Hassle free desktop shell - https://docs.noctalia.dev/getting-started/nixos/
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
home = {
|
home = {
|
||||||
username = "serenity";
|
username = "serenity";
|
||||||
homeDirectory = "/home/serenity";
|
homeDirectory = "/home/serenity";
|
||||||
stateVersion = "23.11";
|
stateVersion = "24.11";
|
||||||
#extraOutputsToInstall = [ ];
|
#extraOutputsToInstall = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,71 +1,29 @@
|
||||||
{
|
{ self, inputs, ... }: {
|
||||||
self,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
flake.nixosConfigurations =
|
flake.nixosConfigurations =
|
||||||
let
|
let
|
||||||
# shorten paths
|
# shorten paths
|
||||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||||
|
|
||||||
homeImports = import "${self}/home/profiles";
|
homeImports = import "${self}/home/profiles";
|
||||||
|
mod = "${self}/modules/system";
|
||||||
mod = "${self}/system";
|
|
||||||
# get the basic config to build on top of
|
# get the basic config to build on top of
|
||||||
inherit (import mod) base;
|
inherit (import mod) base;
|
||||||
|
|
||||||
# get these into the module system
|
# get these into the module system
|
||||||
specialArgs = { inherit inputs self; };
|
specialArgs = { inherit inputs self; };
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
persephone = nixosSystem {
|
|
||||||
inherit specialArgs;
|
|
||||||
modules = base ++ [
|
|
||||||
./persephone
|
|
||||||
"${mod}/core/lanzaboote.nix"
|
|
||||||
|
|
||||||
"${mod}/programs/gamemode.nix"
|
|
||||||
"${mod}/programs/hyprland"
|
|
||||||
"${mod}/programs/games.nix"
|
|
||||||
|
|
||||||
"${mod}/network/syncthing.nix"
|
|
||||||
|
|
||||||
"${mod}/services/kanata"
|
|
||||||
"${mod}/services/gnome-services.nix"
|
|
||||||
"${mod}/services/location.nix"
|
|
||||||
|
|
||||||
{
|
|
||||||
home-manager = {
|
|
||||||
users.mihai.imports = homeImports."mihai@io";
|
|
||||||
extraSpecialArgs = specialArgs;
|
|
||||||
backupFileExtension = ".hm-backup";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs.agenix.nixosModules.default
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
hades = nixosSystem {
|
hades = nixosSystem {
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
modules = base ++ [
|
modules = base ++ [
|
||||||
|
#inputs.foo.bar
|
||||||
./hades
|
./hades
|
||||||
"${mod}/hardware/ddcci.nix"
|
|
||||||
|
|
||||||
"${mod}/programs/gamemode.nix"
|
|
||||||
"${mod}/programs/hyprland"
|
|
||||||
"${mod}/programs/games.nix"
|
"${mod}/programs/games.nix"
|
||||||
|
|
||||||
"${mod}/network/syncthing.nix"
|
"${mod}/network/syncthing.nix"
|
||||||
|
|
||||||
"${mod}/services/kanata"
|
"${mod}/services/kanata"
|
||||||
"${mod}/services/gnome-services.nix"
|
|
||||||
"${mod}/services/location.nix"
|
|
||||||
|
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
users.mihai.imports = homeImports."mihai@io";
|
users.serenity.imports = homeImports."serenity";
|
||||||
extraSpecialArgs = specialArgs;
|
extraSpecialArgs = specialArgs;
|
||||||
backupFileExtension = ".hm-backup";
|
backupFileExtension = ".hm-backup";
|
||||||
};
|
};
|
||||||
|
|
@ -76,19 +34,19 @@
|
||||||
nixos = nixosSystem {
|
nixos = nixosSystem {
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
modules = [
|
modules = [
|
||||||
./wsl
|
"${mod}/users.nix"
|
||||||
"${mod}/core/users.nix"
|
|
||||||
"${mod}/nix"
|
"${mod}/nix"
|
||||||
"${mod}/programs/zsh.nix"
|
"${mod}/programs/fish.nix"
|
||||||
"${mod}/programs/home-manager.nix"
|
"${mod}/programs/home-manager.nix"
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
users.mihai.imports = homeImports.server;
|
users.serenity.imports = homeImports.minimal;
|
||||||
extraSpecialArgs = specialArgs;
|
extraSpecialArgs = specialArgs;
|
||||||
backupFileExtension = ".hm-backup";
|
backupFileExtension = ".hm-backup";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
||||||
{
|
{ pkgs, lib, self, ... }: {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
self,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./hardware
|
./hardware
|
||||||
./network
|
./network
|
||||||
|
|
@ -13,11 +8,10 @@
|
||||||
|
|
||||||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
|
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# Set hostname
|
||||||
networking.hostName = "hades";
|
networking.hostName = "hades";
|
||||||
|
|
||||||
security.tpm2.enable = true;
|
# For SSD/NVME
|
||||||
|
|
||||||
# for SSD/NVME
|
|
||||||
services.fstrim.enable = true;
|
services.fstrim.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
53
modules/hosts3/hades/configuration.nix
Normal file
53
modules/hosts3/hades/configuration.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{ self, ... }:
|
||||||
|
{
|
||||||
|
flake.nixosModules.coreConfiguration =
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.hadesHardware
|
||||||
|
self.nixosModules.coreConfig
|
||||||
|
self.nixosModules.programs
|
||||||
|
self.nixosModules.niri
|
||||||
|
];
|
||||||
|
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
users.users.serenity = {
|
||||||
|
shell = pkgs.fish;
|
||||||
|
ignoreShellProgramCheck = true;
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"i2c"
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"input"
|
||||||
|
];
|
||||||
|
packages = with pkgs; [
|
||||||
|
tree
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vim
|
||||||
|
wget
|
||||||
|
git
|
||||||
|
curl
|
||||||
|
bat
|
||||||
|
xclip
|
||||||
|
ddcutil
|
||||||
|
unzip
|
||||||
|
ripgrep
|
||||||
|
tealdeer
|
||||||
|
chezmoi
|
||||||
|
];
|
||||||
|
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
};
|
||||||
|
}
|
||||||
21
modules/hosts3/hades/default.nix
Normal file
21
modules/hosts3/hades/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ self, inputs, config, ... }: {
|
||||||
|
|
||||||
|
flake.nixosConfigurations.hades = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
self.nixosModules.hadesHardware
|
||||||
|
self.nixosModules.coreConfiguration
|
||||||
|
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.backupFileExtension = "bak";
|
||||||
|
home-manager.users.serenity = {
|
||||||
|
imports = [
|
||||||
|
config.flake.homeModules.base
|
||||||
|
config.flake.homeModules.hadesHome
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
42
modules/hosts3/hades/hardware.nix
Normal file
42
modules/hosts3/hades/hardware.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
flake.nixosModules.desktopHardware =
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/2f4a231c-04a1-4bb9-9370-c207573be881";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/7D2E-5F33";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/misc/flake-parts.nix
Normal file
7
modules/misc/flake-parts.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
6
modules/misc/hm-parts.nix
Normal file
6
modules/misc/hm-parts.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ inputs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.flakeModules.home-manager
|
||||||
|
];
|
||||||
|
}
|
||||||
0
modules/misc/theme.nix
Normal file
0
modules/misc/theme.nix
Normal file
29
modules/system/core.nix
Normal file
29
modules/system/core.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ self, lib, ... }:
|
||||||
|
# default configuration shared by all hosts
|
||||||
|
{
|
||||||
|
flake.nixosModules.coreConfig = { pkgs, ... }: {
|
||||||
|
imports = [
|
||||||
|
self.nixosModules.audioConfig
|
||||||
|
self.nixosModules.nixConfig
|
||||||
|
];
|
||||||
|
|
||||||
|
documentation.dev.enable = true;
|
||||||
|
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_AU.UTF-8";
|
||||||
|
# saves space
|
||||||
|
supportedLocales = [
|
||||||
|
"en_AU.UTF-8/UTF-8"
|
||||||
|
"en_US.UTF-8/UTF-8"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# don't touch this
|
||||||
|
system.stateVersion = lib.mkDefault "24.11";
|
||||||
|
|
||||||
|
time.timeZone = lib.mkDefault "Australia/Brisbane";
|
||||||
|
|
||||||
|
# compresses half the ram for use as swap
|
||||||
|
zramSwap.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
# default configuration shared by all hosts
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./security.nix
|
|
||||||
./users.nix
|
|
||||||
../nix
|
|
||||||
];
|
|
||||||
|
|
||||||
documentation.dev.enable = true;
|
|
||||||
|
|
||||||
i18n = {
|
|
||||||
defaultLocale = "en_US.UTF-8";
|
|
||||||
# saves space
|
|
||||||
supportedLocales = [
|
|
||||||
"en_US.UTF-8/UTF-8"
|
|
||||||
"ja_JP.UTF-8/UTF-8"
|
|
||||||
"ro_RO.UTF-8/UTF-8"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# don't touch this
|
|
||||||
system.stateVersion = lib.mkDefault "23.11";
|
|
||||||
|
|
||||||
time.timeZone = lib.mkDefault "Europe/Bucharest";
|
|
||||||
|
|
||||||
# compresses half the ram for use as swap
|
|
||||||
zramSwap.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +1,17 @@
|
||||||
let
|
let
|
||||||
desktop = [
|
desktop = [
|
||||||
|
|
||||||
./core
|
./security.nix
|
||||||
./core/boot.nix
|
./users.nix
|
||||||
|
|
||||||
|
./core.nix
|
||||||
|
#./core
|
||||||
|
./nix
|
||||||
|
|
||||||
./network
|
./network
|
||||||
./hardware/brightness.nix
|
./hardware
|
||||||
./hardware/graphics.nix
|
|
||||||
./hardware/bluetooth.nix
|
|
||||||
./programs
|
./programs
|
||||||
./services
|
./services
|
||||||
./services/greetd.nix
|
|
||||||
./services/pipewire.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
laptop = desktop ++ [
|
laptop = desktop ++ [
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@ let
|
||||||
home = "/home/${name}";
|
home = "/home/${name}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.user =
|
flake.nixosModules.u-serenity =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
self.homeModules.baseHome
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
|
@ -27,7 +27,6 @@ in
|
||||||
stateVersion = "26.05";
|
stateVersion = "26.05";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
kitty
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue