initial commit + sops!
This commit is contained in:
8
.sops.yaml
Normal file
8
.sops.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
keys:
|
||||||
|
- &xps age18axr5n678k0n0vy763wau57fmtck3q03qgcz3r5kq9nkpkwgye4q5swrgq
|
||||||
|
|
||||||
|
creation_rules:
|
||||||
|
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
|
||||||
|
key_groups:
|
||||||
|
- age:
|
||||||
|
- *xps
|
||||||
314
flake.lock
generated
Normal file
314
flake.lock
generated
Normal file
@@ -0,0 +1,314 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"base16": {
|
||||||
|
"inputs": {
|
||||||
|
"fromYaml": "fromYaml"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1708890466,
|
||||||
|
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=",
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "base16.nix",
|
||||||
|
"rev": "665b3c6748534eb766c777298721cece9453fdae",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "base16.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base16-fish": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1622559957,
|
||||||
|
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
|
||||||
|
"owner": "tomyun",
|
||||||
|
"repo": "base16-fish",
|
||||||
|
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tomyun",
|
||||||
|
"repo": "base16-fish",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base16-foot": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727574105,
|
||||||
|
"narHash": "sha256-ByMVgH0rZ1by2YIVJ47gE8/ZHWcG8yqsErQ4tKLbm7Q=",
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "base16-foot",
|
||||||
|
"rev": "e558fe47e187093313f19fa6a9eea61940ffbd6b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "base16-foot",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base16-helix": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725860795,
|
||||||
|
"narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=",
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "base16-helix",
|
||||||
|
"rev": "7f795bf75d38e0eea9fed287264067ca187b88a9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "base16-helix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base16-kitty": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721117198,
|
||||||
|
"narHash": "sha256-+vEXvEsar7w7wPVRmKx+rJKUTD5DBgLR7jfl0k7VhnE=",
|
||||||
|
"owner": "kdrag0n",
|
||||||
|
"repo": "base16-kitty",
|
||||||
|
"rev": "0898f2677f3a583cc6a89bde29b2b05ac2041e0b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kdrag0n",
|
||||||
|
"repo": "base16-kitty",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base16-tmux": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1727571738,
|
||||||
|
"narHash": "sha256-AOITVZMhqELOzL5Jw54NIX7R8gFbTJqrHEDuPwgGYDQ=",
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "base16-tmux",
|
||||||
|
"rev": "44fbe9034653c83a8ae68941aaeeeeb7503cd1ae",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "base16-tmux",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"base16-vim": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1663659192,
|
||||||
|
"narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=",
|
||||||
|
"owner": "chriskempson",
|
||||||
|
"repo": "base16-vim",
|
||||||
|
"rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "chriskempson",
|
||||||
|
"repo": "base16-vim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1673956053,
|
||||||
|
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fromYaml": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689549921,
|
||||||
|
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "fromYaml",
|
||||||
|
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "fromYaml",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gnome-shell": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713702291,
|
||||||
|
"narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=",
|
||||||
|
"owner": "GNOME",
|
||||||
|
"repo": "gnome-shell",
|
||||||
|
"rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "GNOME",
|
||||||
|
"ref": "46.1",
|
||||||
|
"repo": "gnome-shell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1726989464,
|
||||||
|
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"stylix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724435763,
|
||||||
|
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1728328465,
|
||||||
|
"narHash": "sha256-a0a0M1TmXMK34y3M0cugsmpJ4FJPT/xsblhpiiX1CXo=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1bfbbbe5bbf888d675397c66bfdb275d0b99361c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731763621,
|
||||||
|
"narHash": "sha256-ddcX4lQL0X05AYkrkV2LMFgGdRvgap7Ho8kgon3iWZk=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c69a9bffbecde46b4b939465422ddc59493d3e4d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725194671,
|
||||||
|
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"sops-nix": "sops-nix",
|
||||||
|
"stylix": "stylix"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sops-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1735468296,
|
||||||
|
"narHash": "sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8=",
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "sops-nix",
|
||||||
|
"rev": "bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "sops-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"stylix": {
|
||||||
|
"inputs": {
|
||||||
|
"base16": "base16",
|
||||||
|
"base16-fish": "base16-fish",
|
||||||
|
"base16-foot": "base16-foot",
|
||||||
|
"base16-helix": "base16-helix",
|
||||||
|
"base16-kitty": "base16-kitty",
|
||||||
|
"base16-tmux": "base16-tmux",
|
||||||
|
"base16-vim": "base16-vim",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gnome-shell": "gnome-shell",
|
||||||
|
"home-manager": "home-manager_2",
|
||||||
|
"nixpkgs": "nixpkgs_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1718122552,
|
||||||
|
"narHash": "sha256-A+dBkSwp8ssHKV/WyXb9uqIYrHBqHvtSedU24Lq9lqw=",
|
||||||
|
"owner": "danth",
|
||||||
|
"repo": "stylix",
|
||||||
|
"rev": "e59d2c1725b237c362e4a62f5722f5b268d566c7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "danth",
|
||||||
|
"ref": "release-24.05",
|
||||||
|
"repo": "stylix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
51
flake.nix
Normal file
51
flake.nix
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
description = "A very basic flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
|
||||||
|
home-manager.url = "github:nix-community/home-manager?ref=release-24.05";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
#hyprland.url = "github:hyprwm/Hyprland";
|
||||||
|
#nix-colors.url = "github:misterio77/nix-colors";
|
||||||
|
stylix.url = "github:danth/stylix/release-24.05";
|
||||||
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, home-manager, stylix, sops-nix, ... } @ inputs: let
|
||||||
|
inherit (self) outputs;
|
||||||
|
username = "jared";
|
||||||
|
in {
|
||||||
|
nixosConfigurations = {
|
||||||
|
# ============ NixOS Configuration ============ #
|
||||||
|
tito = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {inherit inputs username stylix;};
|
||||||
|
modules = [
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
sops-nix.nixosModules.sops
|
||||||
|
./hosts/tito/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.jared = import ./home/jared/home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
xps = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {inherit inputs username stylix;};
|
||||||
|
modules = [
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
sops-nix.nixosModules.sops
|
||||||
|
./hosts/xps/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.jared = import ./home/jared/home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
66
home/jared/home.nix
Normal file
66
home/jared/home.nix
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# This is your home-manager configuration file
|
||||||
|
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
stylix,
|
||||||
|
home-manager,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
home = {
|
||||||
|
username = "jared";
|
||||||
|
homeDirectory = "/home/jared";
|
||||||
|
packages = with pkgs; [
|
||||||
|
cowsay
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# stylix.enable = true;
|
||||||
|
|
||||||
|
# Add stuff for your user as you see fit:
|
||||||
|
# programs.neovim.enable = true;
|
||||||
|
# home.packages = with pkgs; [ steam ];
|
||||||
|
|
||||||
|
# Enable home-manager and git
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
# programs.git.enable = true;
|
||||||
|
programs.kitty.enable = true;
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
programs.zellij.enable = true;
|
||||||
|
programs.zellij.settings = {
|
||||||
|
keybinds."unbind" = "Ctrl o";
|
||||||
|
keybinds.session."bind \"Ctrl p\"".SwitchToMode = "Normal";
|
||||||
|
keybinds."shared_except \"session\" \"locked\""."bind \"Ctrl 9\"".SwitchToMode = "Session";
|
||||||
|
};
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
# programs.spotify-player.enable = true;
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/wm/keybindings" = {
|
||||||
|
switch-applications = [];
|
||||||
|
switch-applications-backward = [];
|
||||||
|
switch-windows = [ "<Alt>Tab" ];
|
||||||
|
switch-windows-backward = [ "<Shift><Alt>Tab" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
programs.bash.enable = true;
|
||||||
|
programs.bash.bashrcExtra = ''
|
||||||
|
if [ -f .bashrc.orig ]; then
|
||||||
|
. ~/.bashrc.orig
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Nicely reload system units when changing configs
|
||||||
|
# systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
}
|
||||||
21
hosts/common/nvidia.nix
Normal file
21
hosts/common/nvidia.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
#nvidia-docker
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
virtualisation.docker.enableNvidia = true;
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
}
|
||||||
172
hosts/tito/configuration.nix
Normal file
172
hosts/tito/configuration.nix
Normal file
@@ -0,0 +1,172 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
username,
|
||||||
|
stylix,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../modules/nvidia.nix
|
||||||
|
../../modules/gnome.nix
|
||||||
|
# Does not play nicely with Nvidia right now
|
||||||
|
# ../../modules/hyprland/hyprland.nix
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
];
|
||||||
|
|
||||||
|
sops.defaultSopsFile = ../../secrets/secrets.yaml;
|
||||||
|
sops.defaultSopsFormat = "yaml";
|
||||||
|
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
|
sops.secrets."protonvpn/norway_config" = {};
|
||||||
|
sops.secrets."protonvpn/us_config" = {};
|
||||||
|
sops.secrets."protonvpn/auth-user-pass" = {};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
loader.systemd-boot.enable = true;
|
||||||
|
loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
kernel.sysctl = {
|
||||||
|
"vm.swappiness" = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "tito";
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
printing.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
|
tailscale.enable = true;
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
};
|
||||||
|
chromium.enable = true;
|
||||||
|
nh = {
|
||||||
|
enable = true;
|
||||||
|
#clean.enable = true;
|
||||||
|
#clean.extraArgs = "--keep-since 4d --keep 3";
|
||||||
|
flake = "/etc/nixos";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
users.users.${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"audito"
|
||||||
|
"video"
|
||||||
|
"input"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
neovim
|
||||||
|
gcc
|
||||||
|
tailscale
|
||||||
|
firefox
|
||||||
|
htop
|
||||||
|
nerdfonts
|
||||||
|
kitty
|
||||||
|
yazi
|
||||||
|
nodejs
|
||||||
|
openvpn
|
||||||
|
audio-recorder
|
||||||
|
qemu
|
||||||
|
qemu_kvm
|
||||||
|
spotify
|
||||||
|
strawberry
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
services.openvpn.servers = {
|
||||||
|
proton-norway = {
|
||||||
|
autoStart = false;
|
||||||
|
config = ''
|
||||||
|
config ${config.sops.secrets."protonvpn/norway_config".path}
|
||||||
|
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
proton-united-states = {
|
||||||
|
autoStart = false;
|
||||||
|
config = ''
|
||||||
|
config ${config.sops.secrets."protonvpn/us_config".path}
|
||||||
|
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/da-one-ocean.yaml";
|
||||||
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/solarflare.yaml";
|
||||||
|
#stylix.image = /home/jared/Pictures/venice.jpg;
|
||||||
|
stylix.image = /home/jared/Pictures/tropea.jpg;
|
||||||
|
|
||||||
|
stylix.targets.gnome.enable = true;
|
||||||
|
stylix.cursor.package = pkgs.vimix-cursor-theme;
|
||||||
|
stylix.cursor.name = "Vimix-Cursors";
|
||||||
|
# stylix.enable = true;
|
||||||
|
# stylix.targets.kitty.enable = true;
|
||||||
|
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
# ============= Maybe common ============= #
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.nameservers = [
|
||||||
|
"192.168.1.3"
|
||||||
|
"9.9.9.9"
|
||||||
|
"1.1.1.1"
|
||||||
|
];
|
||||||
|
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
39
hosts/tito/hardware-configuration.nix
Normal file
39
hosts/tito/hardware-configuration.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# 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" "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/b030079d-d72f-43a8-a437-4368f4275b66";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/A646-15B0";
|
||||||
|
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.enp12s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp13s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
183
hosts/xps/configuration.nix
Normal file
183
hosts/xps/configuration.nix
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
username,
|
||||||
|
stylix,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports =
|
||||||
|
[ # Include the results of the hardware scan.
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../modules/gnome.nix
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
];
|
||||||
|
|
||||||
|
sops.defaultSopsFile = ../../secrets/secrets.yaml;
|
||||||
|
sops.defaultSopsFormat = "yaml";
|
||||||
|
sops.age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
|
sops.secrets."protonvpn/norway_config" = {};
|
||||||
|
sops.secrets."protonvpn/us_config" = {};
|
||||||
|
sops.secrets."protonvpn/auth-user-pass" = {};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
loader.systemd-boot.enable = true;
|
||||||
|
loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
kernel.sysctl = {
|
||||||
|
"vm.swappiness" = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "xps";
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
printing.enable = true;
|
||||||
|
openssh.enable = true;
|
||||||
|
tailscale.enable = true;
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc."openvpn/update-resolv-conf".source = "${pkgs.update-resolv-conf}/libexec/openvpn/update-resolv-conf";
|
||||||
|
services.openvpn.servers = {
|
||||||
|
proton-norway = {
|
||||||
|
autoStart = false;
|
||||||
|
config = ''
|
||||||
|
config ${config.sops.secrets."protonvpn/norway_config".path}
|
||||||
|
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
proton-united-states = {
|
||||||
|
autoStart = false;
|
||||||
|
config = ''
|
||||||
|
config ${config.sops.secrets."protonvpn/us_config".path}
|
||||||
|
auth-user-pass ${config.sops.secrets."protonvpn/auth-user-pass".path}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
nh = {
|
||||||
|
enable = true;
|
||||||
|
flake = "/home/${username}/nix-config";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
users.users.${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"audio"
|
||||||
|
"video"
|
||||||
|
"input"
|
||||||
|
"docker"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
#services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Enable the Pantheon Desktop Environment.
|
||||||
|
#services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
#services.xserver.desktopManager.pantheon.enable = true;
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable automatic login for the user.
|
||||||
|
services.displayManager.autoLogin.enable = true;
|
||||||
|
services.displayManager.autoLogin.user = "jared";
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
neovim
|
||||||
|
gcc
|
||||||
|
tailscale
|
||||||
|
firefox
|
||||||
|
htop
|
||||||
|
nerdfonts
|
||||||
|
kitty
|
||||||
|
yazi
|
||||||
|
nodejs
|
||||||
|
openvpn
|
||||||
|
audio-recorder
|
||||||
|
qemu
|
||||||
|
qemu_kvm
|
||||||
|
spotify
|
||||||
|
strawberry
|
||||||
|
unzip
|
||||||
|
libation
|
||||||
|
nodePackages.prettier
|
||||||
|
update-resolv-conf
|
||||||
|
dconf2nix
|
||||||
|
libation
|
||||||
|
sops
|
||||||
|
];
|
||||||
|
environment.variables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
stylix.enable = true;
|
||||||
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/solarflare.yaml";
|
||||||
|
stylix.image = /home/jared/Pictures/SupermassiveBinaryBlackHoles.png;
|
||||||
|
stylix.cursor.package = pkgs.vimix-cursor-theme;
|
||||||
|
stylix.cursor.name = "Vimix-Cursors";
|
||||||
|
stylix.targets.gnome.enable = true;
|
||||||
|
# stylix.targets.kitty.enable = true;
|
||||||
|
|
||||||
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
|
|
||||||
|
networking.nameservers = [
|
||||||
|
"192.168.1.3"
|
||||||
|
"1.1.1.1"
|
||||||
|
"9.9.9.9"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
#sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
}
|
||||||
40
hosts/xps/hardware-configuration.nix
Normal file
40
hosts/xps/hardware-configuration.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# 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 = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/77969bfa-44f3-44f2-9c57-69fd161f6a75";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/FFD6-BA11";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/d495d805-4feb-4b25-ab7d-8eeb66efe3a7"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
12
modules/gnome.nix
Normal file
12
modules/gnome.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ config, pkgs, stylix, ... }:
|
||||||
|
{
|
||||||
|
# Enable the X11 windowing system.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
# stylix.targets.gnome.enable = true;
|
||||||
|
|
||||||
|
# Enable the GNOME Desktop Environment.
|
||||||
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
}
|
||||||
|
|
||||||
54
modules/hyprland/hyprland.nix
Normal file
54
modules/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{ config, pkgs, stylix, ... }:
|
||||||
|
{
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
# nvidiaPatches = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.displayManager.sddm.enable = true;
|
||||||
|
services.displayManager.sddm.wayland.enable = true;
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
# Cursor could be invisible without this
|
||||||
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
|
# Electron, use wayland
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# bar
|
||||||
|
(waybar.overrideAttrs (oldAttrs: {
|
||||||
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||||
|
})
|
||||||
|
)
|
||||||
|
#Elkowar wacky widges (alternate bar)
|
||||||
|
#eww
|
||||||
|
|
||||||
|
# notifications
|
||||||
|
dunst
|
||||||
|
#mako
|
||||||
|
|
||||||
|
libnotify
|
||||||
|
|
||||||
|
# wallpaper
|
||||||
|
swww
|
||||||
|
|
||||||
|
# app-launcher
|
||||||
|
rofi-wayland
|
||||||
|
];
|
||||||
|
|
||||||
|
services.dbus.enable = true;
|
||||||
|
xdg.portal.enable = true;
|
||||||
|
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
opengl.enable = true;
|
||||||
|
nvidia.modesetting.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
17
modules/nvidia.nix
Normal file
17
modules/nvidia.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
virtualisation.docker.enableNvidia = true;
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
}
|
||||||
24
secrets/secrets.yaml
Normal file
24
secrets/secrets.yaml
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user