renamed hosts and working on multi user conf
This commit is contained in:
parent
a603eb08a4
commit
f7891e1f30
21 changed files with 208 additions and 75 deletions
12
default.nix
12
default.nix
|
@ -6,15 +6,11 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.nvf.nixosModules.default
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
(mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
|
||||
(mkAliasOptionModule ["home"] ["hm" "home"])
|
||||
]
|
||||
++ (mapModulesRec' (toString ./modules) import);
|
||||
# (mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
|
||||
# (mkAliasOptionModule ["home"] ["hm" "home"])
|
||||
];
|
||||
# ++ (mapModulesRec' (toString ./modules) import);
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
|
|
4
hosts/aule/README.md
Normal file
4
hosts/aule/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Description
|
||||
|
||||
My future build server, reasoning for the name being the following chain of thought:
|
||||
**Aule -> the smith -> smithing is building -> build server**
|
|
@ -1,44 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
# imports = [ ./hardware.nix ];
|
||||
|
||||
user_name = "moeke";
|
||||
# user = {
|
||||
# name = "moeke";
|
||||
# display_name = "Ons mam";
|
||||
# };
|
||||
|
||||
modules = {
|
||||
themes = {
|
||||
enable = true;
|
||||
theme = "everforest";
|
||||
polarity = "light";
|
||||
};
|
||||
|
||||
system.audio.enable = true;
|
||||
networking.enable = true;
|
||||
|
||||
desktop = {
|
||||
plasma.enable = true;
|
||||
|
||||
terminal = {
|
||||
default = "alacritty";
|
||||
alacritty.enable = true;
|
||||
};
|
||||
|
||||
editors = {
|
||||
default = "nano";
|
||||
nano.enable = true;
|
||||
};
|
||||
|
||||
browsers = {
|
||||
default = "chrome";
|
||||
chrome.enable=true;
|
||||
};
|
||||
};
|
||||
|
||||
shell = {
|
||||
default = "zsh";
|
||||
};
|
||||
};
|
||||
}
|
4
hosts/manwe/README.md
Normal file
4
hosts/manwe/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Description
|
||||
|
||||
My desktop, reasoning for the name being the following chain of thought:
|
||||
**Manwe -> the king of the valar -> leader -> desktop is main machine**
|
|
@ -35,7 +35,6 @@
|
|||
|
||||
desktop = {
|
||||
plasma.enable = true;
|
||||
type = "wayland";
|
||||
|
||||
applications = {
|
||||
communication.enable = true;
|
4
hosts/orome/README.md
Normal file
4
hosts/orome/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Description
|
||||
|
||||
My work laptop, reasoning for the name being the following chain of thought:
|
||||
**Orome -> the huntsman -> hunting means leaving home -> work laptop travels with me**
|
|
@ -1,7 +1,5 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./hardware.nix ];
|
||||
|
||||
modules = {
|
||||
themes = {
|
||||
enable = true;
|
||||
|
@ -12,23 +10,30 @@
|
|||
system.audio.enable = true;
|
||||
networking.enable = true;
|
||||
|
||||
develop = {
|
||||
rust.enable = true;
|
||||
js.enable = true;
|
||||
dotnet.enable = true;
|
||||
};
|
||||
|
||||
desktop = {
|
||||
plasma.enable = true;
|
||||
|
||||
terminal = {
|
||||
default = "alacritty";
|
||||
alacritty.enable = true;
|
||||
default = "ghostty";
|
||||
ghostty.enable = true;
|
||||
};
|
||||
|
||||
editors = {
|
||||
default = "nano";
|
||||
nano.enable = true;
|
||||
default = "zed";
|
||||
zed.enable = true;
|
||||
nvim.enable = true;
|
||||
};
|
||||
|
||||
browsers = {
|
||||
default = "firefox";
|
||||
default = "chromium";
|
||||
firefox.enable = true;
|
||||
firefox.privacy.enable = true;
|
||||
chrome.enable = true;
|
||||
};
|
||||
};
|
||||
|
35
hosts/orome/hardware.nix
Normal file
35
hosts/orome/hardware.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkDefault;
|
||||
in
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/8c4eaf57-fdb2-4c4c-bcc0-74e85a1c7985";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/C842-316A";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/0ddf001a-5679-482e-b254-04a1b9094794"; }
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
kernelParams = [];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
networking.useDHCP = mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
48
hosts/orome/users/chris/default.nix
Normal file
48
hosts/orome/users/chris/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ ... }:
|
||||
{
|
||||
# full_name = "Chris Kruining";
|
||||
# is_trusted = true;
|
||||
|
||||
modules = {
|
||||
themes = {
|
||||
enable = true;
|
||||
theme = "everforest";
|
||||
polarity = "dark";
|
||||
};
|
||||
|
||||
system.audio.enable = true;
|
||||
networking.enable = true;
|
||||
|
||||
develop = {
|
||||
rust.enable = true;
|
||||
js.enable = true;
|
||||
dotnet.enable = true;
|
||||
};
|
||||
|
||||
desktop = {
|
||||
plasma.enable = true;
|
||||
|
||||
terminal = {
|
||||
default = "ghostty";
|
||||
ghostty.enable = true;
|
||||
};
|
||||
|
||||
editors = {
|
||||
default = "zed";
|
||||
zed.enable = true;
|
||||
nvim.enable = true;
|
||||
};
|
||||
|
||||
browsers = {
|
||||
default = "chromium";
|
||||
firefox.enable = true;
|
||||
chrome.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
shell = {
|
||||
default = "zsh";
|
||||
corePkgs.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
48
hosts/orome/users/kaas/default.nix
Normal file
48
hosts/orome/users/kaas/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ ... }:
|
||||
{
|
||||
# full_name = "Kaas Mans";
|
||||
# is_trusted = false;
|
||||
|
||||
modules = {
|
||||
themes = {
|
||||
enable = true;
|
||||
theme = "everforest";
|
||||
polarity = "dark";
|
||||
};
|
||||
|
||||
system.audio.enable = true;
|
||||
networking.enable = true;
|
||||
|
||||
develop = {
|
||||
rust.enable = true;
|
||||
js.enable = true;
|
||||
dotnet.enable = true;
|
||||
};
|
||||
|
||||
desktop = {
|
||||
plasma.enable = true;
|
||||
|
||||
terminal = {
|
||||
default = "ghostty";
|
||||
ghostty.enable = true;
|
||||
};
|
||||
|
||||
editors = {
|
||||
default = "zed";
|
||||
zed.enable = true;
|
||||
nvim.enable = true;
|
||||
};
|
||||
|
||||
browsers = {
|
||||
default = "chromium";
|
||||
firefox.enable = true;
|
||||
chrome.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
shell = {
|
||||
default = "zsh";
|
||||
corePkgs.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
3
hosts/tulkas/README.md
Normal file
3
hosts/tulkas/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Description
|
||||
|
||||
This will be my future game server
|
4
hosts/ulmo/README.md
Normal file
4
hosts/ulmo/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Description
|
||||
|
||||
My current server, reasoning for the name being the following chain of thought:
|
||||
**Ulmo -> the king of the sea -> the sea provides -> services are provided -> server runs services**
|
|
@ -27,9 +27,8 @@
|
|||
};
|
||||
|
||||
desktop = {
|
||||
type = "wayland";
|
||||
|
||||
plasma.enable = true;
|
||||
type = "wayland";
|
||||
|
||||
terminal = {
|
||||
default = "alacritty";
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
args@{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
|
@ -6,11 +6,11 @@
|
|||
...
|
||||
}: let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
inherit (builtins) baseNameOf elem;
|
||||
inherit (builtins) baseNameOf elem map;
|
||||
inherit (lib.attrsets) filterAttrs;
|
||||
inherit (lib.modules) mkDefault mkIf;
|
||||
inherit (lib.modules) mkAliasOptionModule mkDefault mkIf;
|
||||
inherit (lib.strings) removeSuffix;
|
||||
inherit (self.modules) mapModules;
|
||||
inherit (self.modules) mapModules mapModulesRec';
|
||||
inherit (self) mkSysUser mkHmUser;
|
||||
in rec
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ in rec
|
|||
nixosSystem {
|
||||
inherit system;
|
||||
|
||||
specialArgs = {inherit lib inputs system;};
|
||||
specialArgs = {inherit lib inputs system; };
|
||||
|
||||
modules =
|
||||
let
|
||||
|
@ -34,19 +34,35 @@ in rec
|
|||
configurationRevision = with inputs; mkIf (self ? rev) self.rev;
|
||||
};
|
||||
|
||||
imports = [ "${path}/hardware.nix" ];
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
"${path}/hardware.nix"
|
||||
]
|
||||
++ (mapModulesRec' (toString ../modules) import);
|
||||
|
||||
|
||||
users = {
|
||||
mutableUsers = true; # Set this to false when I get sops with passwords set up properly
|
||||
users = mapModules "${path}/users" mkSysUser;
|
||||
# users = mapModules "${path}/users" mkSysUser;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
sharedModules = [
|
||||
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||
];
|
||||
users = mapModules "${path}/users" (p: mkHmUser p stateVersion);
|
||||
|
||||
users = {
|
||||
chris = {
|
||||
imports = [ "${path}/users/chris/default.nix" ];
|
||||
};
|
||||
kaas = {
|
||||
imports = [ "${path}/users/kaas/default.nix" ];
|
||||
};
|
||||
};
|
||||
|
||||
# users = mapModules "${path}/users" (p: mkHmUser p stateVersion);
|
||||
};
|
||||
}
|
||||
(filterAttrs (n: v: !elem n ["system"]) attrs)
|
||||
|
|
|
@ -12,6 +12,6 @@ in
|
|||
inherit (lib.types) either str;
|
||||
inherit (lib.my) mkOpt;
|
||||
in {
|
||||
type = mkOpt (either str null) null;
|
||||
type = mkOpt (either str null) "wayland";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
{ inputs, config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nvf.nixosModules.default
|
||||
];
|
||||
|
||||
options.modules.desktop.editors.nvim = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "neo-vim (nixvim)"; };
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
{ config, options, lib, pkgs, inputs, ... }:
|
||||
{ inputs, config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib.modules) mkIf;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||
];
|
||||
|
||||
options.modules.services.games.minecraft = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
{ inputs, config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (builtins) getEnv map;
|
||||
inherit (lib.attrsets) attrValues mapAttrsToList;
|
||||
|
@ -9,6 +9,10 @@ let
|
|||
cfg = config.modules.themes;
|
||||
desktop = config.modules.desktop;
|
||||
in {
|
||||
imports = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
|
||||
options.modules.themes = let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) nullOr enum;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue