Reorganize configs

This commit is contained in:
2024-07-11 12:21:43 -07:00
parent f23f4f7746
commit f7872964ec
19 changed files with 98 additions and 94 deletions

19
flake.lock generated
View File

@@ -16,9 +16,26 @@
"type": "github" "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": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
} }
} }
}, },

View File

@@ -3,19 +3,37 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
}; };
outputs = { self, nixpkgs } @inputs: { outputs = { self, nixpkgs, nixpkgs-unstable } @inputs:
let
mkHost = { hostname, system, stateVersion }: nixpkgs.lib.nixosSystem {
system = system;
modules = [
{
networking = {
hostName = hostname;
networkmanager.enable = true;
};
system.stateVersion = stateVersion;
}
./modules/nixos
./hosts/${hostname}
];
specialArgs = { inherit inputs; };
};
in {
nixosConfigurations = { nixosConfigurations = {
marauder = nixpkgs.lib.nixosSystem { marauder = mkHost {
hostname = "marauder";
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ ./hosts/marauder ]; stateVersion = "24.05";
specialArgs = { inherit inputs; };
}; };
monolith = nixpkgs.lib.nixosSystem { monolith = mkHost {
hostname = "monolith";
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ ./hosts/monolith ]; stateVersion = "24.05";
specialArgs = { inherit inputs; };
}; };
}; };
}; };

View File

@@ -1,13 +1,33 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cargo # Chat clients
rustc discord
rustfmt element-desktop
gcc telegram-desktop
# Browsers
firefox
# Coding
(vscode-with-extensions.override { (vscode-with-extensions.override {
vscodeExtensions = import ./vscode-extensions.nix { inherit pkgs; }; vscodeExtensions = with pkgs.vscode-extensions; [
bbenoist.nix
github.copilot
arrterian.nix-env-selector
];
}) })
# Art and 3D
inkscape
openscad-unstable
bambu-studio
# Multimedia
vlc
# Productivity
obsidian
]; ];
programs = { programs = {
@@ -30,7 +50,10 @@
set linenumbers set linenumbers
''; '';
}; };
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
}; };
fonts.packages = [pkgs.fira-code];
} }

View File

@@ -1,6 +1,10 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, inputs, ... }:
{ {
imports = [ imports = [
./apps.nix
./backup.nix
./boot.nix
./hardware.nix
../../modules/nixos ../../modules/nixos
]; ];
@@ -13,5 +17,16 @@
"flakes" "flakes"
]; ];
services = {
xserver = {
enable = true;
desktopManager = {
cinnamon.enable = true;
xterm.enable = false;
};
};
displayManager.defaultSession = "cinnamon";
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@@ -1,5 +1,9 @@
{ config, lib, pkgs, inputs, ... }: { config, lib, pkgs, inputs, outputs, ... }:
{ {
imports = [
outputs.nixosModules
];
time.timeZone = "America/Los_Angeles"; time.timeZone = "America/Los_Angeles";
nix.settings.experimental-features = [ nix.settings.experimental-features = [
@@ -7,5 +11,10 @@
"flakes" "flakes"
]; ];
networking = {
hostName = "monolith";
networkmanager.enable = true;
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }

View File

@@ -1,8 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
discord
element-desktop
telegram-desktop
];
}

View File

@@ -1,19 +1,6 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./backup.nix
./boot.nix
./chat.nix
./coding.nix
./gaming.nix
./hardware.nix
./illustration.nix
./interface.nix
./media.nix
./modelling.nix
./networking.nix
./productivity.nix
./users.nix ./users.nix
./web.nix
]; ];
} }

View File

@@ -1,8 +0,0 @@
{ ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
}

View File

@@ -1,4 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [pkgs.inkscape];
}

View File

@@ -1,13 +0,0 @@
{ ... }:
{
services = {
xserver = {
enable = true;
desktopManager = {
cinnamon.enable = true;
xterm.enable = false;
};
};
displayManager.defaultSession = "cinnamon";
};
}

View File

@@ -1,4 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [pkgs.vlc];
}

View File

@@ -1,7 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
openscad-unstable
bambu-studio
];
}

View File

@@ -1,7 +0,0 @@
{ ... }:
{
networking = {
hostName = "marauder";
networkmanager.enable = true;
};
}

View File

@@ -1,4 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [pkgs.obsidian];
}

View File

@@ -1,6 +0,0 @@
{ pkgs, ... }:
with pkgs.vscode-extensions; [
bbenoist.nix
github.copilot
arrterian.nix-env-selector
]

View File

@@ -1,4 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = [pkgs.firefox];
}