Compare commits

...

15 Commits

Author SHA1 Message Date
4323c60940 107 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-08 23:44:37 +01:00
866b756f61 106 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-08 23:44:05 +01:00
a16000bf6d 105 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-08 23:37:42 +01:00
ae6526445e 104 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-08 23:28:19 +01:00
180fc699ef 103 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-08 22:51:47 +01:00
1c47048cb5 101 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 12:04:26 +01:00
0f38139d45 100 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 11:56:28 +01:00
d77d438248 99 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 11:45:35 +01:00
a653e1756f 98 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 11:38:49 +01:00
ad5d0049cf 97 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 11:31:57 +01:00
c9d27ad09c 96 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 11:24:18 +01:00
525e40cb46 94 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 11:10:34 +01:00
1a1b3f5744 93 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 00:39:12 +01:00
c3b6ed84bd 92 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 00:31:59 +01:00
0127a4ea3f 91 current 1970-01-01 01:00:00 24.05.20240303.b8697e5 6.6.19 * 2024-03-07 00:14:16 +01:00
11 changed files with 253 additions and 69 deletions

7
.sops.yaml Normal file
View File

@ -0,0 +1,7 @@
keys:
- &max age1d6ze98387f0gryqwvrdlcxgz3wgs607ach4duwmnp72dzaa63cxqchc78n
creation_rules:
- path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups:
- age:
- *max

View File

@ -36,10 +36,48 @@
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1709428628,
"narHash": "sha256-//ZCCnpVai/ShtO2vPjh3AWgo8riXCaret6V9s7Hew4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "66d65cb00b82ffa04ee03347595aa20e41fe3555",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"sops-nix": "sops-nix"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1709711091,
"narHash": "sha256-L0rSIU9IguTG4YqSj4B/02SyTEz55ACq5t8gXpzteYc=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "25dd60fdd08fcacee2567a26ba6b91fe098941dc",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
}
},

View File

@ -8,12 +8,18 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
sops-nix,
...
} @ inputs: let
system = "x86_64-linux";
@ -21,6 +27,7 @@
in {
nixosConfigurations."MaxNixosLaptop" = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
system = "x86_64-linux";
modules = [
./hosts/MaxNixosLaptop/configuration.nix
home-manager.nixosModules.default
@ -28,6 +35,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
sops-nix.nixosModules.sops
];
};
};

View File

@ -7,6 +7,10 @@
imports = [
# sway as windowmanager
../../modules/home-manager/sway.nix
# zsh config
../../modules/home-manager/zsh.nix
# foot terminal emulator
../../modules/home-manager/foot.nix
];
# Home Manager needs a bit of information about you and the paths it should
@ -28,13 +32,9 @@
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
zsh
starship
zoxide
lazygit
btop
bat
eza
unzip
rustup
nextcloud-client
@ -57,6 +57,7 @@
youtube-dl
dconf
distrobox
gyroflow
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
@ -93,67 +94,6 @@
EDITOR = "nvim";
};
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
defaultKeymap = "emacs";
dotDir = ".config/zsh";
history.expireDuplicatesFirst = true;
history.path = "$ZDOTDIR/.zsh_history";
historySubstringSearch.enable = true;
shellAliases = {
ls = "exa --icons -a --group-directories-first";
diff = "diff --color=auto";
grep = "grep --color=auto";
ip = "ip --color=auto";
mkdir = "mkdir -p";
gst = "git status";
gc = "git commit";
ga = "git add";
gpl = "git pull";
gpu = "git push";
gd = "git diff";
gch = "git checkout";
gs = "git switch";
gre = "git restore";
gr = "git remote";
gcl = "git clone";
glg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
gb = "git branch";
gm = "git merge";
gf = "git fetch";
rebuild = "~/dotfiles/nixos/rebuild.sh";
};
syntaxHighlighting.enable = true;
syntaxHighlighting.highlighters = ["main" "brackets"];
};
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
settings = {
add_newline = false;
command_timeout = 5000;
character = {
success_symbol = "[->](bold green)";
error_symbol = "[ X](bold red)";
};
cmd_duration = {
min_time = 500;
show_milliseconds = true;
};
};
};
programs.zoxide = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
options = ["--cmd cd"];
};
services.nextcloud-client.enable = true;
services.mpd = {

View File

@ -0,0 +1,30 @@
{...}: {
programs.foot = {
enable = true;
settings = {
main = {
font = "FiraCode Nerd Font Mono:size=10";
dpi-aware = "yes";
};
colors = {
regular0 = "222222"; # black
regular1 = "cc9393"; # red
regular2 = "7f9f7f"; # green
regular3 = "d0bf8f"; # yellow
regular4 = "8cd0d3"; # blue
regular5 = "dc8cc3"; # magenta
regular6 = "93e0e3"; # cyan
regular7 = "dcdccc"; # white
bright0 = "666666"; # black
bright1 = "dca3a3"; # red
bright2 = "bfebbf"; # green
bright3 = "f0dfaf"; # yellow
bright4 = "8cd0d3"; # blue
bright5 = "fcace3"; # magenta
bright6 = "b3ffff"; # cyan
bright7 = "ffffff"; # white
};
};
};
}

View File

@ -17,7 +17,7 @@
enable = true;
systemd = {
enable = true;
xdgAutostart = true;
xdgAutostart = false;
};
wrapperFeatures = {
@ -75,6 +75,8 @@
};
};
startup = [
{command = "dbus-sway-environment";}
{command = "configure-gtk";}
{command = "${pkgs.keepassxc}/bin/keepassxc";}
{command = "${pkgs.waybar}/bin/waybar";}
{command = "${pkgs.foot}/bin/foot";}
@ -165,6 +167,18 @@
position = "1920,0";
}
];
laptop_hannspree.outputs = [
{
criteria = "eDP-1";
position = "320,1440";
}
{
criteria = "HannStar Display Corp HC281UPB ";
position = "0,0";
mode = "3840x2160@60";
scale = 1.5;
}
];
};
};

View File

@ -0,0 +1,62 @@
{pkgs, ...}: {
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
defaultKeymap = "emacs";
dotDir = ".config/zsh";
history.expireDuplicatesFirst = true;
history.path = "$ZDOTDIR/.zsh_history";
historySubstringSearch.enable = true;
shellAliases = {
ls = "${pkgs.eza}/bin/eza --icons -a --group-directories-first";
diff = "diff --color=auto";
grep = "grep --color=auto";
ip = "ip --color=auto";
mkdir = "mkdir -p";
gst = "git status";
gc = "git commit";
ga = "git add";
gpl = "git pull";
gpu = "git push";
gd = "git diff";
gch = "git checkout";
gs = "git switch";
gre = "git restore";
gr = "git remote";
gcl = "git clone";
glg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold yellow)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
gb = "git branch";
gm = "git merge";
gf = "git fetch";
rebuild = "~/dotfiles/nixos/rebuild.sh";
};
syntaxHighlighting.enable = true;
syntaxHighlighting.highlighters = ["main" "brackets"];
};
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
settings = {
add_newline = false;
command_timeout = 5000;
character = {
success_symbol = "[](bold green)";
error_symbol = "[](bold red)";
};
cmd_duration = {
min_time = 500;
show_milliseconds = true;
};
};
};
programs.zoxide = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
options = ["--cmd cd"];
};
}

View File

@ -15,8 +15,10 @@
natural_scroll "enable"
}
exec dbus-sway-environment
exec configure-gtk
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l; swaymsg exit"
exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
@ -24,11 +26,39 @@
-b 'Reboot' 'systemctl reboot'
'';
in {
programs.regreet = {
enable = true;
settings = {
background = {
fit = "Containe";
path = "~/Documents/Blender/desktop background Informatiker/render 4K new color.png";
};
gtk = {
application_prefer_dark_theme = true;
cursor_theme_name = "capitaine-cursors-white";
font_name = "FiraCode Nerd Font";
icon_theme_name = "WhiteSur-dark";
theme_name = "WhiteSur-Dark";
};
commands = {
reboot = ["systemctl" "reboot"];
poweroff = ["systemctl" "poweroff"];
};
};
};
users.users.greeter = {
isNormalUser = false;
description = "Greeter";
extraGroups = [];
};
services.greetd = {
enable = true;
settings = {
default_session = {
initial_session = {
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
user = "greeter";
};
};
};

View File

@ -53,8 +53,10 @@ in {
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
# xdg-desktop-portal works by exposing a series of D-Bus interfaces

32
modules/nixos/wifi.nix Normal file
View File

@ -0,0 +1,32 @@
{config, ...}: {
sops.secrets."wireless.env" = {};
networking.wireless = {
enable = true;
userControlled.enable = true;
environmentFile = config.sops.secrets."wireless.env".path;
networks = {
"@home_uuid@" = {
psk = "@home_psk@";
priority = 10;
};
"@par_uuid@" = {
psk = "@par_psk@";
priority = 10;
};
"@luhbots_uuid@" = {
psk = "@luhbots_psk@";
priority = 5;
};
eduroam = {
auth = ''
key_mgmt=WPA-EAP
eap=PWD
identity="@eduroam_ident@"
password="@eduroam_psk@"
'';
priority = 0;
};
};
};
users.extraUsers.max.extraGroups = ["wheel"];
}

21
secrets/wifi.yaml Normal file
View File

@ -0,0 +1,21 @@
wireless.env: ENC[AES256_GCM,data:JSJjKuLsEz7niHs1tOJP0a11Hn2rWw8b671v6Fmq/8Gx+z4Pbz4ndwnsuJOK1fWN0LILCUmKr0pKOIoF+iDWPHJLN0j7iRGQui1AMC10a6uOhCqe0ILPdcGLqIbbo3jEn3/64L4qCVkC7nfHWoOH5v9ccTpPSi90tfLFc/SCqUpeoF0o26v+edxqyEkN+eI01S4vBy7TWijL30BYOiCAI3Q8PDQ7YKwHQukRyApLI2F1DYl0YW/BXOwqvuAvcejXYsM2/Abl0zLnRClTj7War0PS7svVGIzE,iv:ZTI9d/usa4oEWWJ3n3VBmeX3uMuJbuHBxL7ds/dkxZM=,tag:h0c0jvddS0RA2NkQBl3/AQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1d6ze98387f0gryqwvrdlcxgz3wgs607ach4duwmnp72dzaa63cxqchc78n
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA1dUU1SERuNW9QODFDVFMr
NVRuelgyLzJQL3lmT1dKc3lqVU5WVUZod204CndiNThocnVERm5KVXhSZlE1TGtK
ZzMxNlljOGdWU0pOVXhVY2dyekFkWkUKLS0tIHNwZFNyeHBhSHlnSVVxVDBQNWEr
d0FZc0x5UVhPQ09xUE5Qa1A0QkExVmcKkcy1i+nME0uHlLy8vCu8vgqSuR+0NqaD
D+zKRKNdfJn1TLsoyDb4iDSeqp8nB9fZzQqIJshGRhlnqxuzIiYqqA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-03-08T22:34:29Z"
mac: ENC[AES256_GCM,data:MPUKmmbm8aB0BV3yWTeEIAfDudRGo4GSW6LVNBMCVUp/GXNYw45C/w09/u2d6o1oBSIBOZP03mR18sSNpaz7t98iw+F5bArMqefP+nULdhz3D58Zqm8lcaSMVjqCOc8q1O2o/bbhiE3qXZoC2It85Xym1BiVO5fdbwFZVRPa3aY=,iv:Z7Cg8qQg1e3gMHITgU4TfQbBIEx8/9lyhiQVNuQ+/yA=,tag:n/1uaNgHmw7MheLz/+41nA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1