Adhere to NixOS systems #1

Merged
wymiller merged 6 commits from suite-switch into master 2024-09-08 15:52:47 -05:00
7 changed files with 132 additions and 85 deletions
Showing only changes of commit 90b4e20fae - Show all commits

View File

@ -41,6 +41,22 @@
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1711997201,
"narHash": "sha256-J71xzQlVYsjagA4AsVwRazhBh2rZrPpKvxTgs6UzL7c=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "b76fa31346db7fc958a9898f3c594696ca71c4fd",
"type": "github"
},
"original": {
"owner": "gmodena",
"ref": "v0.4.1",
"repo": "nix-flatpak",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1725407940,
@ -77,6 +93,7 @@
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs",
"nixpkgs-darwin": "nixpkgs-darwin"
}

View File

@ -2,6 +2,7 @@
description = "Wyatt's nix configuration suite";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-24.05-darwin";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
@ -16,6 +17,7 @@
outputs = inputs @ {
self,
nixpkgs,
nix-flatpak,
darwin,
home-manager,
...
@ -67,7 +69,10 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = extraSpecialArgs;
home-manager.users.${userName} = import ./home;
home-manager.users.${userName}.imports = [
nix-flatpak.homeManagerModules.nix-flatpak
./home
];
}
];
};

5
home/browser.nix Normal file
View File

@ -0,0 +1,5 @@
{pkgs, ...}: {
programs.firefox = {
enable = pkgs.stdenv.isLinux;
};
}

View File

@ -49,6 +49,8 @@
discord
obsidian
vscode
weechat
# iamb
ollama
# games?

View File

@ -3,7 +3,7 @@
userName,
...
}: {
# import sub modules
# Import sub modules
imports = [
./atuin.nix
./shell.nix
@ -25,6 +25,9 @@
if pkgs.stdenv.isDarwin
then "/Users/${userName}"
else "/home/${userName}";
sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
};
stateVersion = "24.05";
};

View File

@ -9,104 +9,92 @@ in {
xwayland = true;
systemd.enable = true;
# Install packages that will be installed with sway
# extraPackages = with pkgs; [
# wl-clipboard
# wofi
# mako
# wttrbar
# light
# brightnessctl
# playerctl
# grim
# slurp
# cliphist
# ];
wrapperFeatures = {
gtk = true;
};
};
programs.wofi.enable = pkgs.stdenv.isLinux;
programs.mako.enable = pkgs.stdenv.isLinux;
# programs.cliphist.enable = pkgs.stdenv.isLinux;
programs.waybar = {
enable = pkgs.stdenv.isLinux;
systemd.enable = true;
style = ''
* {
border: none;
border-radius: 0;
font-family: "Monaspace Krypton";
font-size: 13px;
min-height: 0;
}
window#waybar {
background: #1f2335;
border-bottom: 1px solid #24283b;
color: #c0caf5;
opacity: 0.808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808;
}
#workspaces button {
padding: 5px;
padding-left: 12px;
padding-right: 12px;
background: transparent;
color: #c0caf5;
border-bottom: 1px solid transparent;
}
#workspaces button.focused {
background: #c0caf5;
color: #1d2021;
border-bottom: 1px solid #c0caf5;
}
#cpu,
#memory,
#pulseaudio,
#network,
#battery,
#clock,
#custom-playerctl {
padding: 0 10px;
margin: 0 5px;
}
#battery.charging {
color: #9ece6a;
}
#battery.warning:not(.charging) {
color: #ff9e64;
}
@keyframes blink {
to {
background-color: #1d2021;
color: #ebdbb2;
* {
border: none;
border-radius: 0;
font-family: "Monaspace Krypton";
font-size: 13px;
min-height: 0;
}
window#waybar {
background: #1f2335;
border-bottom: 1px solid #24283b;
color: #c0caf5;
opacity: 0.808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808080808;
}
#workspaces button {
padding: 5px;
padding-left: 12px;
padding-right: 12px;
background: transparent;
color: #c0caf5;
border-bottom: 1px solid transparent;
}
#workspaces button.focused {
background: #c0caf5;
color: #1d2021;
border-bottom: 1px solid #c0caf5;
}
#cpu,
#memory,
#pulseaudio,
#network,
#battery,
#clock,
#custom-playerctl {
padding: 0 10px;
margin: 0 5px;
}
#battery.critical:not(.charging) {
background: #f7768e;
color: #ebdbb2;
border-bottom: 1px solid #ebdbb2;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#battery.charging {
color: #9ece6a;
}
#network.disconnected {
color: #cc241d;
}
#battery.warning:not(.charging) {
color: #ff9e64;
}
#pulseaudio.muted {
color: #cc241d;
}
@keyframes blink {
to {
background-color: #1d2021;
color: #ebdbb2;
}
}
#battery.critical:not(.charging) {
background: #f7768e;
color: #ebdbb2;
border-bottom: 1px solid #ebdbb2;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#network.disconnected {
color: #cc241d;
}
#pulseaudio.muted {
color: #cc241d;
}
'';
};
}

View File

@ -69,6 +69,13 @@
wireguard-tools
podman
toolbox
grim
slurp
playerctl
light
brightnessctl
wttrbar
cliphist
];
# Install system-wide fonts
@ -118,4 +125,24 @@
# Add username to groups "wheel" and "video" - more may be added here later
users.users.${userName}.extraGroups = ["wheel" "video"];
# XDG stuff
xdg = {
portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
};
# Firewall stuff not allowed in common user and network creation
networking.firewall.enable = true; # VERY important, do not touch
# networking.firewall.allowedTCPPorts = [];
# networking.firewall.allowedUDPPorts = [];
networking.networkmanager.enable = true; # Linux tool for managing network connections
# Enable Flatpak (app containerization)
services.flatpak.enable = true;
}