Compare commits
No commits in common. "62493285d20d3082c5fe3b8fa4bf1fc855d6387c" and "ae71c618c75fec0c0e49c3c7f71463f5ca67da23" have entirely different histories.
62493285d2
...
ae71c618c7
65 changed files with 83 additions and 229 deletions
96
flake.nix
96
flake.nix
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "My NixOS desktop and server configs";
|
description = "A simple NixOS flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
||||||
|
@ -28,97 +28,55 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@attrs:
|
outputs = { self, nixpkgs, home-manager, disko, nixos-hardware, ... }@inputs:
|
||||||
let
|
let
|
||||||
supportedSystems = [ "x86_64-linux" ];
|
inherit (self) outputs;
|
||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
forAllSystems = nixpkgs.lib.genAttrs [
|
||||||
forAllSystemsUnstable = nixpkgs-unstable.lib.genAttrs supportedSystems;
|
"x86_64-linux"
|
||||||
|
];
|
||||||
pkgs = forAllSystems (system: import nixpkgs { inherit system; });
|
inherit (nixpkgs) lib;
|
||||||
pkgs-unstable = forAllSystemsUnstable (system: import nixpkgs-unstable { inherit system; });
|
configVars = import /home/willifan/.nix-config/vars { inherit inputs lib; };
|
||||||
|
specialArgs = { inherit inputs outputs configVars nixpkgs; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# Please replace my-nixos with your hostname
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
Lenni = let
|
Lenni = lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
inherit specialArgs;
|
||||||
in
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
|
|
||||||
specialArgs = {
|
|
||||||
hostname = "Lenni";
|
|
||||||
type = "desktop";
|
|
||||||
inherit system;
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
attrs.home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
#home-manager.users.willifan = import ./users/willifan/home;
|
||||||
|
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
||||||
}
|
}
|
||||||
attrs.disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
attrs.nixos-hardware.nixosModules.framework-12th-gen-intel
|
nixos-hardware.nixosModules.framework-12th-gen-intel
|
||||||
./hosts
|
./hosts
|
||||||
./users/willifan
|
./users/willifan
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Puenktchen = let
|
Puenktchen = lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
inherit specialArgs;
|
||||||
in
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
|
|
||||||
specialArgs = {
|
|
||||||
hostname = "Puenktchen";
|
|
||||||
type = "desktop";
|
|
||||||
inherit system;
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
attrs.home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
#home-manager.users.willifan = import ./users/willifan/home;
|
||||||
|
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
||||||
}
|
}
|
||||||
attrs.disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
attrs.nixos-hardware.nixosModules.common-cpu-amd
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
attrs.nixos-hardware.nixosModules.common-gpu-amd
|
nixos-hardware.nixosModules.common-gpu-amd
|
||||||
./hosts
|
./hosts
|
||||||
./users/willifan
|
./users/willifan
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
Anton = let
|
|
||||||
system = "x86_64-linux";
|
|
||||||
in
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
|
|
||||||
specialArgs = {
|
|
||||||
hostname = "Anton";
|
|
||||||
type = "server";
|
|
||||||
inherit system;
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = [
|
|
||||||
attrs.home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
}
|
|
||||||
attrs.disko.nixosModules.disko
|
|
||||||
attrs.nixos-hardware.nixosModules.common-cpu-amd
|
|
||||||
attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
|
||||||
attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
|
||||||
./hosts
|
|
||||||
./users/willifan
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, configVars, ... }:
|
||||||
{
|
{
|
||||||
|
networking.hostName = configVars.hostname;
|
||||||
|
imports = [
|
||||||
|
./nix-ld.nix
|
||||||
|
./boot.nix
|
||||||
|
./printers.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
services.hardware.bolt.enable = true;
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
console.keyMap = "de";
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
|
@ -1,8 +1,7 @@
|
||||||
{ pkgs, hostname, type, ... }:
|
{ pkgs, configVars, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common
|
./common
|
||||||
./${type}
|
./${configVars.hostname}
|
||||||
./${hostname}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -1,17 +0,0 @@
|
||||||
{ pkgs, hostname, ... }:
|
|
||||||
{
|
|
||||||
networking.hostName = hostname;
|
|
||||||
imports = [
|
|
||||||
./nix-ld.nix
|
|
||||||
./boot.nix
|
|
||||||
./printers.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
services.hardware.bolt.enable = true;
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
console.keyMap = "de";
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
}
|
|
|
@ -1,19 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
mergerfs
|
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/storage" = {
|
|
||||||
fsType = "fuse.mergerfs";
|
|
||||||
device = "/mnt/disks/*";
|
|
||||||
options = ["cache.files=partial" "dropcacheonclose=true" "category.create=mfs"];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.snapraid = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
|
|
||||||
./disko.nix
|
|
||||||
./hardware-configuration.nix
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
{
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
root-drive = {
|
|
||||||
type = "disk";
|
|
||||||
device = "/dev/disk/by-id/wwn-0x5001b44ebc0b613a";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
ESP = {
|
|
||||||
priority = 1;
|
|
||||||
name = "ESP";
|
|
||||||
size = "512M";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
root = {
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "btrfs";
|
|
||||||
extraArgs = [ "-f" ]; # Override existing partition
|
|
||||||
# Subvolumes must set a mountpoint in order to be mounted,
|
|
||||||
# unless their parent is mounted
|
|
||||||
subvolumes = {
|
|
||||||
# Subvolume name is different from mountpoint
|
|
||||||
"/rootfs" = {
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
mountpoint = "/";
|
|
||||||
};
|
|
||||||
# Subvolume name is the same as the mountpoint
|
|
||||||
"/home" = {
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
mountpoint = "/home";
|
|
||||||
};
|
|
||||||
# Parent is not mounted so the mountpoint must be set
|
|
||||||
"/nix" = {
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
mountpoint = "/nix";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -12,7 +12,7 @@
|
||||||
({ pkgs, ... }: {
|
({ pkgs, ... }: {
|
||||||
|
|
||||||
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
|
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
|
||||||
users.users.nixos.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKe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xqd9uXqxMk1Z3VnOwWcK3VXfzzBXKTsX0MaUgF1EqxibkYs9bDZqLEXoRucBqk3wwMPy8RJXqQOupoqa2xEOoduBf1qDHEEm69coHCpPm2mQVUrwsPrmTHmOjh9ir0mkVBDRgHvhq/ctQTVO5/SE2NCgPdlvUV5s44LLsUyxBp5JWwXZWlVys+7Dhil6mtRDcH4CXceJn0VZ61Zv2jrCTxQjKsroitSkNbpAkKajQ9moLMAblsSwJzl3uvJJ3ydlxjZefwTO/GjyuJMY2sIU2Tu0YbIVgMyq5L782LduVlyWj+RLWoEu19OfMqQvTWhJnQPAbR82qGzlfTGRLUxoY+G5MYipJwgrBQ2TnpWvfpTrZxFrglSfekz0v54lWzNZpW+irImh4w== willifan@proton.me"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -20,8 +20,6 @@
|
||||||
nano
|
nano
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./auto-cpufreq.nix
|
|
||||||
./backlight.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -7,6 +7,8 @@
|
||||||
jq
|
jq
|
||||||
xorg.xrandr
|
xorg.xrandr
|
||||||
|
|
||||||
|
btop
|
||||||
|
|
||||||
feh
|
feh
|
||||||
|
|
||||||
enpass
|
enpass
|
|
@ -1,15 +0,0 @@
|
||||||
{ pkgs, home-manager, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./envvar.nix
|
|
||||||
./git.nix
|
|
||||||
./hyfetch.nix
|
|
||||||
./locales.nix
|
|
||||||
#./ssh.nix
|
|
||||||
./syncthing.nix
|
|
||||||
./user.nix
|
|
||||||
#./zsh.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.willifan.home.stateVersion = "23.11";
|
|
||||||
}
|
|
|
@ -1,8 +1,31 @@
|
||||||
{ pkgs, hostname, type, ... }:
|
{ pkgs, home-manager, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common
|
./graphical
|
||||||
./${type}
|
|
||||||
./${hostname}
|
./applications.nix
|
||||||
|
./auto-cpufreq.nix
|
||||||
|
./envvar.nix
|
||||||
|
./git.nix
|
||||||
|
./hyfetch.nix
|
||||||
|
./locales.nix
|
||||||
|
#./ssh.nix
|
||||||
|
./syncthing.nix
|
||||||
|
./udev.nix
|
||||||
|
./user.nix
|
||||||
|
#./zsh.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = rec {
|
||||||
|
initial_session = {
|
||||||
|
command = ''Hyprland'';
|
||||||
|
user = "willifan";
|
||||||
|
};
|
||||||
|
default_session = initial_session;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.willifan.home.stateVersion = "23.11";
|
||||||
}
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.greetd = {
|
|
||||||
enable = true;
|
|
||||||
settings = rec {
|
|
||||||
initial_session = {
|
|
||||||
command = ''Hyprland'';
|
|
||||||
user = "willifan";
|
|
||||||
};
|
|
||||||
default_session = initial_session;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ pkgs, hostname, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./common
|
|
||||||
./${hostname}
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, home-manager-unstable, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -9,8 +9,6 @@
|
||||||
./theme
|
./theme
|
||||||
./web
|
./web
|
||||||
|
|
||||||
./applications.nix
|
|
||||||
./autologin.nix
|
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./thunar.nix
|
./thunar.nix
|
||||||
];
|
];
|
7
users/willifan/graphical/hyprland/default.nix
Normal file
7
users/willifan/graphical/hyprland/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, configVars, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./common
|
||||||
|
./${configVars.hostname}
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, home-manager-unstable, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
Loading…
Add table
Add a link
Reference in a new issue