Compare commits

...

7 commits

Author SHA1 Message Date
Leonardo Eugênio 0a0b8f9e61
gammastep: extract config 2025-03-27 21:09:14 -03:00
Leonardo Eugênio 8cae611cd5
home: add automatic home-manager cleanup service 2025-03-27 19:34:08 -03:00
Leonardo Eugênio 0f61393bf3
refactor: move rm-target service and timer to separate file 2025-03-27 19:34:07 -03:00
Leonardo Eugênio 4ebfaca007
factorio: update backup script filename to fix syncthing integration 2025-03-27 19:34:07 -03:00
Leonardo Eugênio a432569595
update 2025-03-27 19:34:07 -03:00
Leonardo Eugênio 0f161863fc
firefox: remove header styling 2025-03-27 19:34:07 -03:00
Leonardo Eugênio 3c7da418df
gnome: install menulibre 2025-03-27 19:34:07 -03:00
9 changed files with 111 additions and 101 deletions

View file

@ -225,11 +225,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1740485968, "lastModified": 1741786315,
"narHash": "sha256-WK+PZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y=", "narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "19c1140419c4f1cdf88ad4c1cfb6605597628940", "rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -243,11 +243,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1739502527, "lastModified": 1742179690,
"narHash": "sha256-KMLNOCWmqdDeAZV5O1ccRmVqRutDcy4IONJin3lzd0Q=", "narHash": "sha256-s/q3OWRe5m7kwDcAs1BhJEj6aHc5bsBxRnLP7DM77xE=",
"owner": "lelgenio", "owner": "lelgenio",
"repo": "dzgui-nix", "repo": "dzgui-nix",
"rev": "06fcea9445b5a005b40469a69f57f2147398bc94", "rev": "a6d68720c932ac26d549b24f17c776bd2aeb73b4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -456,11 +456,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1739757849, "lastModified": 1742234739,
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", "narHash": "sha256-zFL6zsf/5OztR1NSNQF33dvS1fL/BzVUjabZq4qrtY4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", "rev": "f6af7280a3390e65c2ad8fd059cdc303426cbd59",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -497,11 +497,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1740281615, "lastModified": 1742174123,
"narHash": "sha256-dZWcbAQ1sF8oVv+zjSKkPVY0ebwENQEkz5vc6muXbKY=", "narHash": "sha256-pDNzMoR6m1ZSJToZQ6XDTLVSdzIzmFl1b8Pc3f7iV6Y=",
"owner": "Mic92", "owner": "Mic92",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "465792533d03e6bb9dc849d58ab9d5e31fac9023", "rev": "2cfb4e1ca32f59dd2811d7a6dd5d4d1225f0955c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -520,11 +520,11 @@
"nixpkgs-24_11": "nixpkgs-24_11" "nixpkgs-24_11": "nixpkgs-24_11"
}, },
"locked": { "locked": {
"lastModified": 1740437053, "lastModified": 1742413977,
"narHash": "sha256-exPTta4qI1ka9sk+jPcLogGffJ1OVXnAsTRqpeAXeNw=", "narHash": "sha256-NkhM9GVu3HL+MiXtGD0TjuPCQ4GFVJPBZ8KyI2cFDGU=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "c8ec4d5e432f5df4838eacd39c11828d23ce66ec", "rev": "b4fbffe79c00f19be94b86b4144ff67541613659",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -567,11 +567,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1740560979, "lastModified": 1742422364,
"narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=", "narHash": "sha256-mNqIplmEohk5jRkqYqG19GA8MbQ/D4gQSK0Mu4LvfRQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5135c59491985879812717f4c9fea69604e7f26f", "rev": "a84ebe20c6bc2ecbcfb000a50776219f48d134cc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -628,11 +628,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1740603184, "lastModified": 1742388435,
"narHash": "sha256-t+VaahjQAWyA+Ctn2idyo1yxRIYpaDxMgHkgCNiMJa4=", "narHash": "sha256-GheQGRNYAhHsvPxWVOhAmg9lZKkis22UPbEHlmZMthg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f44bd8ca21e026135061a0a57dcf3d0775b67a49", "rev": "b75693fb46bfaf09e662d09ec076c5a162efa9f6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -800,11 +800,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741043164, "lastModified": 1742406979,
"narHash": "sha256-9lfmSZLz6eq9Ygr6cCmvQiiBEaPb54pUBcjvbEMPORc=", "narHash": "sha256-r0aq70/3bmfjTP+JZs4+XV5SgmCtk1BLU4CQPWGtA7o=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "3f2412536eeece783f0d0ad3861417f347219f4d", "rev": "1770be8ad89e41f1ed5a60ce628dd10877cb3609",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -960,11 +960,11 @@
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1739829690, "lastModified": 1742370146,
"narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=", "narHash": "sha256-XRE8hL4vKIQyVMDXykFh4ceo3KSpuJF3ts8GKwh5bIU=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "3d0579f5cc93436052d94b73925b48973a104204", "rev": "adc195eef5da3606891cedf80c0d9ce2d3190808",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -975,11 +975,11 @@
}, },
"vpsadminos": { "vpsadminos": {
"locked": { "locked": {
"lastModified": 1740754923, "lastModified": 1742222981,
"narHash": "sha256-o7Qo5kkjVgBL9CVqNJKnkcDbRkpD0UAp82G/mJ086Xw=", "narHash": "sha256-EDhfWimpzUnpH5h/FQ3oYw/Kaq4Cx1E5nRofDQyI3aE=",
"owner": "vpsfreecz", "owner": "vpsfreecz",
"repo": "vpsadminos", "repo": "vpsadminos",
"rev": "3a9df8fbe84b680ad0a38ec85e8e9c8a4f095ca3", "rev": "14da38b9a49bf156e06f20ed02533a0549e6d487",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -23,11 +23,12 @@
systemd.services.factorio-backup-save = { systemd.services.factorio-backup-save = {
description = "Backup factorio saves"; description = "Backup factorio saves";
script = '' script = ''
FILENAME="space-age-$(date --iso=seconds | tr ':' '_').zip"
${lib.getExe pkgs.rsync} \ ${lib.getExe pkgs.rsync} \
-av \ -av \
--chown=lelgenio \ --chown=lelgenio \
/var/lib/factorio/saves/default.zip \ /var/lib/factorio/saves/default.zip \
~lelgenio/Documentos/GameSaves/factorio_saves/space-age-$(date --iso=seconds).zip ~lelgenio/Documentos/GameSaves/factorio_saves/$FILENAME
''; '';
serviceConfig.Type = "oneshot"; serviceConfig.Type = "oneshot";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];

View file

@ -127,46 +127,7 @@ in
#sidebar-header { display: none !important; } #sidebar-header { display: none !important; }
'' ''
else else
'' "";
/* Element | chrome://browser/content/browser.xhtml */
#navigator-toolbox {
display: grid;
grid-template-columns: 1fr 50px;
overflow: hidden;
}
/* Element | chrome://browser/content/browser.xhtml */
#nav-bar {
flex: 1;
width: 100%;
grid-column: 1 / 3;
grid-row: 1;
z-index: 0;
padding-right: 29px !important;
}
/* Element | chrome://browser/content/browser.xhtml */
.toolbar-items {
display: none;
}
/* Element | chrome://browser/content/browser.xhtml */
#TabsToolbar {
max-width: 50px;
}
/* Element | chrome://browser/content/browser.xhtml */
#titlebar {
max-width: 50px;
grid-area: 1 / 2;
z-index: 10;
}
'';
}; };
}; };
}; };

View file

@ -35,6 +35,7 @@ lib.mkIf (config.my.desktop == "gnome") {
amberol amberol
pitivi pitivi
keepassxc keepassxc
menulibre
libsForQt5.qt5ct libsForQt5.qt5ct
libsForQt5.qtstyleplugin-kvantum libsForQt5.qtstyleplugin-kvantum

28
user/home-manager.nix Normal file
View file

@ -0,0 +1,28 @@
{ pkgs, lib, ... }:
{
programs.home-manager.enable = true;
systemd.user.services.home-manager-expire = {
Unit = {
Description = "Remove old home-manager generations";
};
Service = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "home-manager-expire" ''
${lib.getExe pkgs.home-manager} expire-generations 7d
'';
};
};
systemd.user.timers.home-manager-expire = {
Unit = {
Description = "Remove old home-manager generations";
};
Timer = {
OnCalendar = "daily";
Unit = "home-manager-expire.service";
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}

View file

@ -9,6 +9,7 @@
{ {
imports = [ imports = [
./dummy.nix ./dummy.nix
./home-manager.nix
./waybar ./waybar
./helix.nix ./helix.nix
./kakoune ./kakoune
@ -44,6 +45,7 @@
inputs.nix-index-database.hmModules.nix-index inputs.nix-index-database.hmModules.nix-index
../settings ../settings
./powerplay-led-idle.nix ./powerplay-led-idle.nix
./rm-target.nix
]; ];
my = import ./variables.nix // { my = import ./variables.nix // {
@ -57,8 +59,6 @@
home.username = "lelgenio"; home.username = "lelgenio";
home.homeDirectory = "/home/lelgenio"; home.homeDirectory = "/home/lelgenio";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
terminal terminal
@ -169,30 +169,6 @@
exec nicotine exec nicotine
''; '';
systemd.user.services.rm-target = {
Unit = {
Description = "Remove directories named 'target'";
};
Service = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "rm-target" ''
sudo ${pkgs.fd}/bin/fd -td -u '^\.?target$' "$HOME" -x rm -vrf --
'';
};
};
systemd.user.timers.rm-target = {
Unit = {
Description = "Remove directories named 'target'";
};
Timer = {
OnCalendar = "weekly";
Unit = "rm-target.service";
};
Install = {
WantedBy = [ "timers.target" ];
};
};
# This value determines the Home Manager release that your # This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage # configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards # when a new Home Manager release introduces backwards

26
user/rm-target.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, lib, ... }:
{
systemd.user.services.rm-target = {
Unit = {
Description = "Remove directories named 'target'";
};
Service = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "rm-target" ''
sudo ${pkgs.fd}/bin/fd -td -u '^\.?target$' "$HOME" -x rm -vrf --
'';
};
};
systemd.user.timers.rm-target = {
Unit = {
Description = "Remove directories named 'target'";
};
Timer = {
OnCalendar = "weekly";
Unit = "rm-target.service";
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}

View file

@ -20,6 +20,7 @@ in
./swayidle.nix ./swayidle.nix
./swaylock.nix ./swaylock.nix
./theme.nix ./theme.nix
./gammastep.nix
]; ];
options.my.sway.enable = lib.mkEnableOption { }; options.my.sway.enable = lib.mkEnableOption { };
@ -32,6 +33,7 @@ in
my.mpd.enable = true; my.mpd.enable = true;
my.zathura.enable = true; my.zathura.enable = true;
my.waybar.enable = true; my.waybar.enable = true;
my.gammastep.enable = true;
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
@ -115,10 +117,6 @@ in
exec_always systemctl --user restart waybar.service exec_always systemctl --user restart waybar.service
''; '';
}; };
services.gammastep = {
enable = true;
provider = "geoclue2";
};
services.kdeconnect = { services.kdeconnect = {
enable = true; enable = true;

19
user/sway/gammastep.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, lib, ... }:
let
cfg = config.my.gammastep;
in
{
options.my.gammastep.enable = lib.mkEnableOption { };
config = lib.mkIf cfg.enable {
services.gammastep = {
enable = true;
dawnTime = "6:00-7:45";
duskTime = "18:35-20:15";
temperature = {
day = 6500;
night = 4500;
};
};
};
}